<?php 

error_reporting(E_ERROR|E_WARNING|E_PARSE); use think\Cache; think\Url::root('/index.php?s='); function getlistdir($value){ return getlistname($value,'list_dir'); } function ff_story_url($value,$id){ $array['tpl_id'] = config('tpl_id'); return getlistname($array['tpl_id'][8],'list_url'); } function ff_star_url($value){ $array['tpl_id'] = config('tpl_id'); return getlistname($array['tpl_id'][7],'list_url'); } function ff_actor_list_url($value){ $array['tpl_id'] = config('tpl_id'); return getlistname($array['tpl_id'][10],'list_url'); } function ff_mcat_name($value,$id,$k){ return mcat_name($value,$id,$k); } function ff_xml_vodactor($value){ return format_vodname($value); } function list_to_tree($list, $pk='id',$pid = 'pid',$child = '_child',$root=0){ $tree = array(); if(is_array($list)) { $refer = array(); foreach ($list as $key => $data) { $refer[$data[$pk]] =& $list[$key]; } foreach ($list as $key => $data) { $parentId = $data[$pid]; if ($root == $parentId) { $tree[] =& $list[$key]; }else{ if (isset($refer[$parentId])) { $parent =& $refer[$parentId]; $parent[$child][] =& $list[$key]; } } } } return $tree; } function list_search($list,$condition) { if(is_string($condition)) parse_str($condition,$condition); $resultSet = array(); if(!empty($list)){ foreach ($list as $key=>$data){ $find = false; foreach ($condition as $field=>$value){ if(isset($data[$field])) { if(0 === strpos($value,'/')) { $find = preg_match($value,$data[$field]); }elseif($data[$field]==$value){ $find = true; } } } if($find) $resultSet[]=&$list[$key]; } return $resultSet; } else{ return false; } } function getlistall($cid){ if(!empty($cid)){ $tree = list_search(F('_data/listtree'),'list_id='.$cid); if(!empty($tree[0]['son'])){ foreach($tree[0]['son'] as $val){$param[]=$val;} return $param; }else{ return false; } } } function getlist($str,$seach,$type){ if(!empty($str)){ $arr = list_search(F('_data/list'),$seach.'='.$str); if(empty($arr)){ return false; }else{ return $arr[0][$type]; } } } function getlistpid($cid){ if(!empty($cid)){ $arr= list_search(F('_data/list'),'list_id='.$cid); if(is_array($arr) && !empty($arr[0]['list_pid'])){ return $arr[0]['list_pid']; }else{ return $cid ; } } } function getlistname($cid,$type='list_name'){ if(!empty($cid)){ $arr= list_search(F('_data/list'),'list_id='.$cid); if(is_array($arr) && !empty($arr)){ return $arr[0][$type]; }else{ return $cid ; } } } function getlistmcat($cid){ if(!empty($cid)){ $pid=getlistname($cid,'list_pid'); $cid=!empty($pid) ? $pid : $cid; $sid=getlistname($cid,'list_sid'); $tree = list_search(F('_data/mcat'),'list_id='.$cid); if(!empty($tree[0]['son'])){ foreach($tree[0]['son'] as $val){ $param[]=$val; } return $param ; }elseif($sid==1){ $catlist = model('Mcat')->list_cat($cid); return $catlist ; } } } function mcat_title($str,$cid="",$k=""){ if(empty($str)){ return "未知"; } $mcids = explode(',', $str); $html = ''; foreach($mcids as $v){ $arr= list_search(F('_data/mcid'),'m_cid='.$v); $html .= $arr[0]['m_name']; } return $html; } function mcat_name($str,$cid="",$k=""){ if(empty($str)){ return "未知"; } $mcids = explode(',', $str); $html = ''; foreach($mcids as $key=>$v){ if(!empty($k) && $key==$k){break;} $arr= list_search(F('_data/mcid'),'m_cid='.$v); if(is_array($arr) && !empty($arr)){ $html .= $arr[0]['m_name']." "; } } return $html; } function mcat_url($str,$cid,$k=""){ if(empty($str)){ return ""; } $mcids = array_filter(explode(',', $str)); $html = ''; foreach($mcids as $key=>$v){ if(!empty($k) && $key==$k){break;} $url = zanpian_type_url('home/vod/type', array('id'=>$cid,'dir'=>getlistname($cid,'list_dir'),'mcid'=>$v,'area'=>"",'year'=>"",'letter'=>"",'order'=>"")); $arr = list_search(F('_data/mcid'),'m_cid='.$v); $html .= "<a href='".$url."' target='_blank'>{$arr[0]['m_name']}</a> "; } return $html; } function getmodeid($sid,$type){ $mode= list_search(F('_data/modellist'),'id='.$sid); if(empty($mode)){ return false; }else{ return $mode[0][$type]; } } function get_vod_info($var,$seach='vod_id',$type='vod_name'){ $arr= db('vod')->where($seach,$var)->value($type); if(!empty($arr)){ return $arr; }else{ return false ; } } function get_vod_find($var,$seach='vod_id',$find="*"){ $arr= db('vod')->field($find)->where($seach,$var)->find(); if(!empty($arr)){ return $arr; }else{ return false ; } } function get_news_info($var,$seach='news_id',$type='vod_name'){ $arr= db('news')->where($seach,$var)->value($type); if(!empty($arr)){ return $arr; }else{ return false ; } } function get_news_find($var,$seach='news_id',$find="*"){ $arr= db('news')->field($find)->where($seach,$var)->find(); if(!empty($arr)){ return $arr; }else{ return false ; } } function get_star_info($var,$seach='star_id',$type='star_name'){ $arr= db('star')->where($seach,$var)->value($type); if(!empty($arr)){ return $arr; }else{ return false ; } } function get_star_find($var,$seach='star_id',$find="*"){ $arr= db('star')->field($find)->where($seach,$var)->find(); if(!empty($arr)){ return $arr; }else{ return false ; } } function get_actor_info($var,$seach='actor_id',$type='actor_vid'){ $info = db('actor')->where($seach,$var)->value($type); if($info){ return $info; }else{ return false ; } } function get_actor_find($var,$seach='actor_id',$find="*"){ $arr= db('actor')->field($find)->where($seach,$var)->find(); if(!empty($arr)){ return $arr; }else{ return false ; } } function get_story_info($var,$seach='story_id',$type='story_vid'){ $arr= db('story')->where($seach,$var)->value($type); if(!empty($arr)){ return $arr; }else{ return false ; } } function get_story_find($var,$seach='story_id',$find="*"){ $arr= db('story')->field($find)->where($seach,$var)->find(); if(!empty($arr)){ return $arr; }else{ return false ; } } function get_role_info($var,$seach='role_id',$type='role_vid'){ $info = db('role')->where($seach,$var)->value($type); if($info){ return $info; }else{ return false ; } } function get_tv_info($var,$seach='tv_id',$type='tv_letters'){ $info = db('tv')->where($seach,$var)->value($type); if($info){ return $info; }else{ return false ; } } function get_special_info($var,$seach='special_id',$type='special_letters'){ $info = db('special')->where($seach,$var)->value($type); if($info){ return $info; }else{ return false ; } } function get_user_info($var,$seach='userid',$type='nickname'){ $info = db('user')->where($seach,$var)->value($type); if($info){ return $info; }else{ return false ; } } function getinfo($vid="",$sid="",$field=""){ $name=getmodeid($sid,'name'); if($name){ $info = db($name)->field($field)->where(array($name.'_id' => $vid))->find(); } if($info){ return $info; } else{ return ""; } } function getlistson($pid){ $tree= list_search(F('_data/listtree'),'list_id='.$pid); if(!empty($tree[0]['son'])){ return false; }else{ return true; } } function getlistarr_tag($cids){ foreach($cids as $key=>$value){ if(getlistson($value)){ $cid .= ','.$value; }else{ $cidin = getlistsqlin($value); $cid .= ','.$cidin[1]; } } $cidarr = explode(',',$cid); unset($cidarr[0]); $cidarr = array_unique($cidarr); return $cidarr; } function getlistsqlin($cid){ $tree = list_search(F('_data/listtree'),'list_id='.$cid); if (!empty($tree[0]['son'])) { foreach($tree[0]['son'] as $val){ $arr['vod_cid'][] = $val['list_id']; } $channel = $cid.','.implode(',', $arr['vod_cid']); return array('IN',''.$channel.''); } return $cid; } function gettypelistcid($vid,$sid){ $cid=get_vod_info($vid,'vod_id','vod_cid'); $list_name=getlistname($cid,'list_name_big'); $mode= list_search(F('_data/modellist'),'id='.$sid); if($sid==4) { $list_name=getlistname($cid); } $cidarray=config($mode[0]['name']."_cidarray"); foreach($cidarray as $key=>$val){ $cidarry=explode("=",$val); $keys[$cidarry[0]]=$cidarry[1]; } if(!empty($cidarray[0]) && $cidarray[0]=="all"){ $where['list_sid']=$sid; $where['list_pid']=0; $id=db('list')->where($where)->value('list_id'); }elseif(!empty($cidarray[0])){ if($keys[$cid]){ $id=$keys[$cid]; }else{ $where['list_sid']=$sid; $where['list_pid']=0; $id=db('list')->where($where)->value('list_id'); } }else{ $where['list_sid']=$sid; $where['list_name']=$list_name; $id=db('list')->where($where)->value('list_id'); if(empty($id)) { unset($where); $where['list_sid']=$sid; $where['list_pid']=0; $pid=db('list')->where($where)->value('list_id'); $data['list_skin']=$mode[0]['name']."_list"; $data['list_skin_detail']=$mode[0]['name']."_detail"; $data['list_sid']=$sid; $data['list_status']=1; if(empty($pid)) { $data['list_name']=$mode[0]['title']; $data['list_pid']=0; $data['list_dir']=getletters(trim($data['list_name']),'list'); $pid=db('list')->insertGetId($data); } $data['list_name']=$list_name; $data['list_pid']=$pid; $data['list_dir']=getletters(trim($data['list_name']),'list'); $id=db('list')->insertGetId($data); } } if($id) { return $id; }else{ return $pid; } } function getcount($cid,$sid,$time=""){ $where=array(); $mode=list_search(F('_data/modellist'),'id='.$sid); if(!empty($mode[0]['name']) && $mode[0]['id']!= 11 && $mode[0]['id']!= 9 && $mode[0]['id']!= 8){ if($time == 999){ $where[$mode[0]['name'].'_cid']=getlistsqlin($cid); $where[$mode[0]['name'].'_status']=1; $where[$mode[0]['name'].'_addtime']=array('gt',getxtime(1)); $count=db($mode[0]['name'])->where($where)->cache($mode[0]['name'].'_daycount_'.$cid,3600,'count')->count(); }elseif($time==1){ $where[$mode[0]['name'].'_cid']=array('gt',0); $count=db($mode[0]['name'])->where($where)->cache($mode[0]['name'].'_countid',3600,'count')->count(); }else { $where[$mode[0]['name'].'_cid']=getlistsqlin($cid); $where[$mode[0]['name'].'_status']=1; $count=db($mode[0]['name'])->where($where)->cache($mode[0]['name'].'_countid_'.$cid,3600,'count')->count(); } return $count+0; } } function detail_array($module='vod', $type='next', $id, $cid, $field='vod_id,vod_cid,vod_status,vod_name,vod_ename,vod_jumpurl'){ $cache_key = 'cache_'.$module.'_'.$type.'_'.$cid.'_'.$id; if(config('data_cache_'.$module)){ $array = cache($cache_key); if($array){ return $array; } } $where = array(); $where[$module.'_cid'] = $cid; $where[$module.'_status'] = 1; if($type == 'next'){ $where[$module.'_id'] = array('gt', $id); $order = $module.'_id asc'; }else{ $where[$module.'_id'] = array('lt', $id); $order = $module.'_id desc'; } if($module != 'vod'){ $field = str_replace('vod_', $module.'_', $field); } $array = db((ucfirst($module)))->field($field)->where($where)->limit(1)->order($order)->find(); if(config('data_cache_'.$module)){ cache($cache_key, $array, intval(config('data_cache_'.$module))); } return $array; } function getnewtime($type='Y-m-d H:i:s',$time,$color='red',$new='',$miao='86400'){ if(empty($new)){ $site_cssjsurl=config('site_cssjsurl'); $public=!empty($site_cssjsurl) ? $site_cssjsurl : config('site_path').PUBLIC_PATH.'tpl/'; $new="<img src='".$public."admin/new.gif'>"; } if((time()-$time)>$miao){ return date($type,$time); }else{ return '<i><font color="'.$color.'">'.date($type,$time).'</font></i>'.$new.''; } } function get_hilight_ex($string,$keyword,$arr='span',$color="black"){ return str_replace($keyword,'<'.$arr.' color="'.$color.'">'.$keyword.'</'.$arr.'>',$string); } function get_http_url(){ $http=$_SERVER['HTTPS'] !== 'on' ? 'http' : 'https'; return htmlspecialchars($http."://".$_SERVER['HTTP_HOST'].$_SERVER["REQUEST_URI"]); } function getletters($name,$sid){ $tree= list_search(F('_data/modellist'),'id='.$sid); $pinyin = new \com\Hzpy(); $name=preg_replace("/\s|\:|(|\~|\`|\!|\@|\#|\\$|\%|\^|\&|\*|\(|\)|\-|\+|\=|\{|\}|\[|\]|\||\\|\:|\;|\"|\'|\<|\,|\>|\.|\?|\/)/is","",$name); if(!empty($tree[0]['name']) || $sid=='list'){ if($sid=='list'){ $dbname='list'; $wherename='list_dir'; }else{ $dbname=$tree[0]['name']; $wherename=$tree[0]['name'].'_letters'; } $rs = db($dbname); $letter=$pinyin->pinyin(trim($name)); $where[$wherename] = $letter; if($rs->where($where)->count() > 0){ $letter = $pinyin->pinyin(trim($name)); $where[$wherename] = $letter; $i = 1; while($rs->where($where)->count() > 0){ $letter = $pinyin->pinyin(trim($name)).$i; $where[$wherename] = $letter; $i++; } } return $letter; } else{ return false ; } } function getletter($s0){ $s0=preg_replace("/\s|\:|(|\~|\`|\!|\@|\#|\\$|\%|\^|\&|\*|\(|\)|\-|\+|\=|\{|\}|\[|\]|\||\\|\:|\;|\"|\'|\<|\,|\>|\.|\?|\/)/is","",$s0); $firstchar_ord=ord(strtoupper($s0{0})); if (($firstchar_ord>=65 and $firstchar_ord<=91)or($firstchar_ord>=48 and $firstchar_ord<=57)) return $s0{0}; $s=iconv("UTF-8","gb2312", $s0); $asc=ord($s{0})*256+ord($s{1})-65536; if($asc>=-20319 and $asc<=-20284)return "A"; if($asc>=-20283 and $asc<=-19776)return "B"; if($asc>=-19775 and $asc<=-19219)return "C"; if($asc>=-19218 and $asc<=-18711)return "D"; if($asc>=-18710 and $asc<=-18527)return "E"; if($asc>=-18526 and $asc<=-18240)return "F"; if($asc>=-18239 and $asc<=-17923)return "G"; if($asc>=-17922 and $asc<=-17418)return "H"; if($asc>=-17417 and $asc<=-16475)return "J"; if($asc>=-16474 and $asc<=-16213)return "K"; if($asc>=-16212 and $asc<=-15641)return "L"; if($asc>=-15640 and $asc<=-15166)return "M"; if($asc>=-15165 and $asc<=-14923)return "N"; if($asc>=-14922 and $asc<=-14915)return "O"; if($asc>=-14914 and $asc<=-14631)return "P"; if($asc>=-14630 and $asc<=-14150)return "Q"; if($asc>=-14149 and $asc<=-14091)return "R"; if($asc>=-14090 and $asc<=-13319)return "S"; if($asc>=-13318 and $asc<=-12839)return "T"; if($asc>=-12838 and $asc<=-12557)return "W"; if($asc>=-12556 and $asc<=-11848)return "X"; if($asc>=-11847 and $asc<=-11056)return "Y"; if($asc>=-11055 and $asc<=-10247)return "Z"; return 0;} function getcolor($str,$color){ if(empty($color)){ return $str; }else{ return '<font color="'.$color.'">'.$str.'</font>'; } } function getxtime($day){ $day = intval($day); return mktime(23,59,59,date("m"),date("d")-$day,date("y")); } function gettimevodnew($type='Y-m-d H:i:s',$time,$color='red',$new='<span class="new"></span>'){ if((time()-$time)>86400){ return ; }else{ return ''.$new.''; } } function get_addons_state($name){ $config=get_addon_info($name); if($config){ return $config['state']; }else{ return 0; } } function get_addons_status($name){ $config=get_addon_config($name); if($config){ return !empty($config[$name.'_status']) ? $config[$name.'_status'] : false; }else{ return false; } } function nr($str){ $str = str_replace(array("<nr/>","<rr/>"),array("\n","\r"),$str); return trim($str); } function format_vodname($vodname){ $vodname = str_replace(array('【','】','（','）','(',')','{','}'),array('[',']','[',']','[',']','[',']'),$vodname); $vodname = preg_replace('/\[([a-z][A-Z])\]|([a-z][A-Z])版/i','',$vodname); $vodname = preg_replace('/TS清晰版|枪版|抢先版|HD|BD|TV|DVD|VCD|TS|\/版|\[\]/i','',$vodname); return trim($vodname); } function format_vodactor($vodactor){ return str_replace(',,',',',str_replace(array('/','，','|','、',' ','，',',,'),',',$vodactor)); } function nb($str){ $find = ['~>\s+<~', '~>(\s+\n|\r)~']; $replace = ['><', '>']; $str = preg_replace($find, $replace, $str); return trim($str); } function msubstr($str, $start=0, $length, $suffix=false){ return zanpian_msubstr(preg_replace('/<[^>]+>/','',preg_replace("/[\r\n\t ]{1,}/",' ',nb($str))),$start,$length,'utf-8',$suffix); } function h($text, $tags = null){ $text = trim($text); $text = preg_replace('/<!--?.*-->/','',$text); $text = preg_replace('/<\?|\?'.'>/','',$text); $text = preg_replace('/<script?.*\/script>/','',$text); $text = str_replace('[','&#091;',$text); $text = str_replace(']','&#093;',$text); $text = str_replace('|','&#124;',$text); $text = preg_replace('/\r?\n/','',$text); $text = preg_replace('/<br(\s\/)?'.'>/i','[br]',$text); $text = preg_replace('/(\[br\]\s*){10,}/i','[br]',$text); while(preg_match('/(<[^><]+)( lang|on|action|background|codebase|dynsrc|lowsrc)[^><]+/i',$text,$mat)){ $text=str_replace($mat[0],$mat[1],$text); } while(preg_match('/(<[^><]+)(window\.|javascript:|js:|about:|file:|document\.|vbs:|cookie)([^><]*)/i',$text,$mat)){ $text=str_replace($mat[0],$mat[1].$mat[3],$text); } if(empty($tags)) { $tags = 'table|td|th|tr|i|b|u|strong|img|p|br|div|strong|em|ul|ol|li|dl|dd|dt|a'; } $text = preg_replace('/<('.$tags.')( [^><\[\]]*)>/i','[\1\2]',$text); $text = preg_replace('/<\/?(html|head|meta|link|base|basefont|body|bgsound|title|style|script|form|iframe|frame|frameset|applet|id|ilayer|layer|name|script|style|xml)[^><]*>/i','',$text); while(preg_match('/<([a-z]+)[^><\[\]]*>[^><]*<\/\1>/i',$text,$mat)){ $text=str_replace($mat[0],str_replace('>',']',str_replace('<','[',$mat[0])),$text); } while(preg_match('/(\[[^\[\]]*=\s*)(\"|\')([^\2=\[\]]+)\2([^\[\]]*\])/i',$text,$mat)){ $text=str_replace($mat[0],$mat[1].'|'.$mat[3].'|'.$mat[4],$text); } while(preg_match('/\[[^\[\]]*(\"|\')[^\[\]]*\]/i',$text,$mat)){ $text=str_replace($mat[0],str_replace($mat[1],'',$mat[0]),$text); } $text = str_replace('<','&lt;',$text); $text = str_replace('>','&gt;',$text); $text = str_replace('"','&quot;',$text); $text = str_replace('[','<',$text); $text = str_replace(']','>',$text); $text = str_replace('|','"',$text); $text = str_replace('  ',' ',$text); return $text; } function zanpian_from_time($time){ $way = time() - $time; $r = ''; if($way < 60){ $r = '刚刚'; }elseif($way >= 60 && $way < 3600){ $r = floor($way/60).'分钟前'; }elseif($way >=3600 && $way < 86400){ $r = floor($way/3600).'小时前'; }elseif($way >=86400 && $way < 2592000){ $r = floor($way/86400).'天前'; }elseif($way >=2592000 && $way < 31536000){ $r = floor($way/2592000).'个月前'; }elseif($way >=2592000 && $way < 315360000){ $r = floor($way/31536000).'年前'; }else{ $r = '10年以前'; } return $r; } function zanpian_name_num($str){ $name = preg_match('/(\d+(\.\d+)?)/is',$str,$number); if(empty($number[0])) { return $str; } $len = strlen($number[0]); if($len == 1) $new_number = sprintf("%'.02d",$number[0]); elseif($len == 2) $new_number = sprintf("%'.02d",$number[0]); elseif($len == 3 && !strstr($number[0], ".")) $new_number = sprintf("%'.03d",$number[0]); elseif($len > 3 && !strstr($number[0], ".")) $new_number = sprintf("%'.04d",$number[0]); else $new_number = $number[0]; return $new_number; } function zanpian_msubstr($str, $start = 0, $length, $charset = "utf-8", $suffix = true) { $re['utf-8'] = "/[\x01-\x7f]|[\xc2-\xdf][\x80-\xbf]|[\xe0-\xef][\x80-\xbf]{2}|[\xf0-\xff][\x80-\xbf]{3}/"; $re['gb2312'] = "/[\x01-\x7f]|[\xb0-\xf7][\xa0-\xfe]/"; $re['gbk'] = "/[\x01-\x7f]|[\x81-\xfe][\x40-\xfe]/"; $re['big5'] = "/[\x01-\x7f]|[\x81-\xfe]([\x40-\x7e]|\xa1-\xfe])/"; preg_match_all($re[$charset], $str, $match); $length_new = $length; for($i=$start; $i<$length; $i++){ if (ord($match[0][$i]) > 0xa0){ }else{ $length_new++; $length_chi++; } } if($length_chi<$length){ $length_new = $length+($length_chi/2); } $slice = join("",array_slice($match[0], $start, $length_new)); if($suffix && $slice != $str){ return $slice."…"; } return $slice; } function remove_xss($val) { $val = preg_replace('/([\x00-\x08,\x0b-\x0c,\x0e-\x19])/', '', $val); $search = 'abcdefghijklmnopqrstuvwxyz'; $search .= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; $search .= '1234567890!@#$%^&*()'; $search .= '~`";:?+/={}[]-_|\'\\'; for ($i = 0; $i < strlen($search); $i++) { $val = preg_replace('/(&#[xX]0{0,8}'.dechex(ord($search[$i])).';?)/i', $search[$i], $val); $val = preg_replace('/(&#0{0,8}'.ord($search[$i]).';?)/', $search[$i], $val); } $ra1 = array('javascript', 'vbscript', 'expression', 'applet', 'meta', 'xml', 'blink', 'link', 'style', 'script', 'embed', 'object', 'iframe', 'frame', 'frameset', 'ilayer', 'layer', 'bgsound', 'title', 'base'); $ra2 = array('onabort', 'onactivate', 'onafterprint', 'onafterupdate', 'onbeforeactivate', 'onbeforecopy', 'onbeforecut', 'onbeforedeactivate', 'onbeforeeditfocus', 'onbeforepaste', 'onbeforeprint', 'onbeforeunload', 'onbeforeupdate', 'onblur', 'onbounce', 'oncellchange', 'onchange', 'onclick', 'oncontextmenu', 'oncontrolselect', 'oncopy', 'oncut', 'ondataavailable', 'ondatasetchanged', 'ondatasetcomplete', 'ondblclick', 'ondeactivate', 'ondrag', 'ondragend', 'ondragenter', 'ondragleave', 'ondragover', 'ondragstart', 'ondrop', 'onerror', 'onerrorupdate', 'onfilterchange', 'onfinish', 'onfocus', 'onfocusin', 'onfocusout', 'onhelp', 'onkeydown', 'onkeypress', 'onkeyup', 'onlayoutcomplete', 'onload', 'onlosecapture', 'onmousedown', 'onmouseenter', 'onmouseleave', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onmousewheel', 'onmove', 'onmoveend', 'onmovestart', 'onpaste', 'onpropertychange', 'onreadystatechange', 'onreset', 'onresize', 'onresizeend', 'onresizestart', 'onrowenter', 'onrowexit', 'onrowsdelete', 'onrowsinserted', 'onscroll', 'onselect', 'onselectionchange', 'onselectstart', 'onstart', 'onstop', 'onsubmit', 'onunload'); $ra = array_merge($ra1, $ra2); $found = true; while ($found == true) { $val_before = $val; for ($i = 0; $i < sizeof($ra); $i++) { $pattern = '/'; for ($j = 0; $j < strlen($ra[$i]); $j++) { if ($j > 0) { $pattern .= '('; $pattern .= '(&#[xX]0{0,8}([9ab]);)'; $pattern .= '|'; $pattern .= '|(&#0{0,8}([9|10|13]);)'; $pattern .= ')*'; } $pattern .= $ra[$i][$j]; } $pattern .= '/i'; $replacement = substr($ra[$i], 0, 2).'<x>'.substr($ra[$i], 2); $val = preg_replace($pattern, $replacement, $val); if ($val_before == $val) { $found = false; } } } return $val; } function post_curl($url,$data){ $co = new \com\Curl(); $data = $co->post($url,$data); return $data; } function write_file($l1, $l2=''){ $dir = dirname($l1); if(!is_dir($dir)){ mkdirss($dir); } return @file_put_contents($l1, $l2); } function mkdirss($dirs,$mode=0777) { if(!is_dir($dirs)){ mkdirss(dirname($dirs), $mode); return @mkdir($dirs, $mode); } return true; } function arr2file($filename, $arr=''){ if(is_array($arr)){ $con = var_export($arr,true); } else{ $con = $arr; } $con = "<?php\nreturn $con;\n?>"; write_file($filename, $con); } function rmdirs($dirname) { if (!is_dir($dirname)) return false; $files = new RecursiveIteratorIterator( new RecursiveDirectoryIterator($dirname, RecursiveDirectoryIterator::SKIP_DOTS), RecursiveIteratorIterator::CHILD_FIRST ); foreach ($files as $fileinfo) { $todo = ($fileinfo->isDir() ? 'rmdir' : 'unlink'); $todo($fileinfo->getRealPath()); } @rmdir($dirname); return true; } function copydirs($source, $dest){ if (!is_dir($dest)) { mkdir($dest, 0755); } foreach ( $iterator = new RecursiveIteratorIterator( new RecursiveDirectoryIterator($source, RecursiveDirectoryIterator::SKIP_DOTS), RecursiveIteratorIterator::SELF_FIRST) as $item ) { if ($item->isDir()) { $sontDir = $dest . DS . $iterator->getSubPathName(); if (!is_dir($sontDir)) { mkdir($sontDir); } } else { copy($item, $dest . DS . $iterator->getSubPathName()); } } } function deldir($path,$delDir=true) { if (is_dir($path) == false){ return FALSE; } $handle = opendir($path); if ($handle){ while (false !== ( $item = readdir($handle) )) { if ($item != "." && $item != "..") is_dir("$path/$item") ? deldir("$path/$item", $delDir) : @unlink("$path/$item"); } closedir($handle); if ($delDir) return @rmdir($path); }else { if (file_exists($path)) { return @unlink($path); } else { return FALSE; } } } function F($name, $value='', $path="") { if(!$path){ $path=RUNTIME_PATH.'data/'; } $file = new \com\File(); static $_cache = array(); $filename = $path . $name . '.php'; if ('' !== $value) { if (is_null($value)) { if(false !== strpos($name,'*')){ return false; }else{ unset($_cache[$name]); return $file->unlink($filename,'F'); } } else { $file->put($filename,serialize($value),'F'); $_cache[$name] = $value; return ; } } if (isset($_cache[$name])) return $_cache[$name]; if ($file->has($filename,'F')){ $value = unserialize($file->read($filename,'F')); $_cache[$name] = $value; } else { $value = false; } return $value; } function hot_keywords($string){ if(config('site_hotkeywords')){ if(config('url_html')){ return '<script type="text/javascript" src="'.config('site_path').'runtime/js/hotkey.js" charset="utf-8"></script>'; }else{ $hotkeywords=F('_data/hotkeywords'); return $hotkeywords; } }else{ return ""; } } function getadsurl($str,$charset="utf-8"){ $url=str_replace(array('//','/./'),'/',config('site_path').config('admin_ads_file').'/'.$str.'.js'); return '<script type="text/javascript" src="'.$url.'" charset="'.$charset.'"></script>'; } function gethits($sid,$type='hits',$array,$js=true){ $mode= list_search(F('_data/modellist'),'id='.$sid); if((config('url_html') && $js) || $type=='insert'){ return '<script type="text/javascript" src="'.url('home/hits/show',array('sid'=>$sid,'id'=>$array[$mode[0]['name'].'_id'],'type'=>$type)).'" charset="utf-8"></script>'; }else{ return $array[$type]; } } function rand_string($len = 6, $type = '', $addChars = '') { $str = ''; switch ($type) { case 0: $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' . $addChars; break; case 1: $chars = str_repeat('0123456789', 3); break; case 2: $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' . $addChars; break; case 3: $chars = 'abcdefghijklmnopqrstuvwxyz' . $addChars; break; case 4: $chars = "们以我到他会作时要动国产的一是工就年阶义发成部民可出能方进在了不和有大这主中人上为来分生对于学下级地个用同行面说种过命度革而多子后自社加小机也经力线本电高量长党得实家定深法表着水理化争现所二起政三好十战无农使性前等反体合斗路图把结第里正新开论之物从当两些还天资事队批点育重其思与间内去因件日利相由压员气业代全组数果期导平各基或月毛然如应形想制心样干都向变关问比展那它最及外没看治提五解系林者米群头意只明四道马认次文通但条较克又公孔领军流入接席位情运器并飞原油放立题质指建区验活众很教决特此常石强极土少已根共直团统式转别造切九你取西持总料连任志观调七么山程百报更见必真保热委手改管处己将修支识病象几先老光专什六型具示复安带每东增则完风回南广劳轮科北打积车计给节做务被整联步类集号列温装即毫知轴研单色坚据速防史拉世设达尔场织历花受求传口断况采精金界品判参层止边清至万确究书术状厂须离再目海交权且儿青才证低越际八试规斯近注办布门铁需走议县兵固除般引齿千胜细影济白格效置推空配刀叶率述今选养德话查差半敌始片施响收华觉备名红续均药标记难存测士身紧液派准斤角降维板许破述技消底床田势端感往神便贺村构照容非搞亚磨族火段算适讲按值美态黄易彪服早班麦削信排台声该击素张密害侯草何树肥继右属市严径螺检左页抗苏显苦英快称坏移约巴材省黑武培著河帝仅针怎植京助升王眼她抓含苗副杂普谈围食射源例致酸旧却充足短划剂宣环落首尺波承粉践府鱼随考刻靠够满夫失包住促枝局菌杆周护岩师举曲春元超负砂封换太模贫减阳扬江析亩木言球朝医校古呢稻宋听唯输滑站另卫字鼓刚写刘微略范供阿块某功套友限项余倒卷创律雨让骨远帮初皮播优占死毒圈伟季训控激找叫云互跟裂粮粒母练塞钢顶策双留误础吸阻故寸盾晚丝女散焊功株亲院冷彻弹错散商视艺灭版烈零室轻血倍缺厘泵察绝富城冲喷壤简否柱李望盘磁雄似困巩益洲脱投送奴侧润盖挥距触星松送获兴独官混纪依未突架宽冬章湿偏纹吃执阀矿寨责熟稳夺硬价努翻奇甲预职评读背协损棉侵灰虽矛厚罗泥辟告卵箱掌氧恩爱停曾溶营终纲孟钱待尽俄缩沙退陈讨奋械载胞幼哪剥迫旋征槽倒握担仍呀鲜吧卡粗介钻逐弱脚怕盐末阴丰雾冠丙街莱贝辐肠付吉渗瑞惊顿挤秒悬姆烂森糖圣凹陶词迟蚕亿矩康遵牧遭幅园腔订香肉弟屋敏恢忘编印蜂急拿扩伤飞露核缘游振操央伍域甚迅辉异序免纸夜乡久隶缸夹念兰映沟乙吗儒杀汽磷艰晶插埃燃欢铁补咱芽永瓦倾阵碳演威附牙芽永瓦斜灌欧献顺猪洋腐请透司危括脉宜笑若尾束壮暴企菜穗楚汉愈绿拖牛份染既秋遍锻玉夏疗尖殖井费州访吹荣铜沿替滚客召旱悟刺脑措贯藏敢令隙炉壳硫煤迎铸粘探临薄旬善福纵择礼愿伏残雷延烟句纯渐耕跑泽慢栽鲁赤繁境潮横掉锥希池败船假亮谓托伙哲怀割摆贡呈劲财仪沉炼麻罪祖息车穿货销齐鼠抽画饲龙库守筑房歌寒喜哥洗蚀废纳腹乎录镜妇恶脂庄擦险赞钟摇典柄辩竹谷卖乱虚桥奥伯赶垂途额壁网截野遗静谋弄挂课镇妄盛耐援扎虑键归符庆聚绕摩忙舞遇索顾胶羊湖钉仁音迹碎伸灯避泛亡答勇频皇柳哈揭甘诺概宪浓岛袭谁洪谢炮浇斑讯懂灵蛋闭孩释乳巨徒私银伊景坦累匀霉杜乐勒隔弯绩招绍胡呼痛峰零柴簧午跳居尚丁秦稍追梁折耗碱殊岗挖氏刃剧堆赫荷胸衡勤膜篇登驻案刊秧缓凸役剪川雪链渔啦脸户洛孢勃盟买杨宗焦赛旗滤硅炭股坐蒸凝竟陷枪黎救冒暗洞犯筒您宋弧爆谬涂味津臂障褐陆啊健尊豆拔莫抵桑坡缝警挑污冰柬嘴啥饭塑寄赵喊垫丹渡耳刨虎笔稀昆浪萨茶滴浅拥穴覆伦娘吨浸袖珠雌妈紫戏塔锤震岁貌洁剖牢锋疑霸闪埔猛诉刷狠忽灾闹乔唐漏闻沈熔氯荒茎男凡抢像浆旁玻亦忠唱蒙予纷捕锁尤乘乌智淡允叛畜俘摸锈扫毕璃宝芯爷鉴秘净蒋钙肩腾枯抛轨堂拌爸循诱祝励肯酒绳穷塘燥泡袋朗喂铝软渠颗惯贸粪综墙趋彼届墨碍启逆卸航衣孙龄岭骗休借" . $addChars; break; default: $chars = 'ABCDEFGHIJKMNPQRSTUVWXYZabcdefghijkmnpqrstuvwxyz23456789' . $addChars; break; } if ($len > 10) { $chars = $type == 1 ? str_repeat($chars, $len) : str_repeat($chars, 5); } if ($type != 4) { $chars = str_shuffle($chars); $str = substr($chars, 0, $len); } else { for ($i = 0; $i < $len; $i++) { $str .= msubstr($chars, floor(mt_rand(0, mb_strlen($chars, 'utf-8') - 1)), 1); } } return $str; } function zanpian_tag_auto($title,$content){ $data = zanpian_get_url('http://keyword.discuz.com/related_kw.html?ics=utf-8&ocs=utf-8&title='.rawurlencode($title).'&content='.rawurlencode(msubstr($content,0,500))); if($data) { $parser = xml_parser_create(); xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0); xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); xml_parse_into_struct($parser, $data, $values, $index); xml_parser_free($parser); $kws = array(); foreach($values as $valuearray) { if($valuearray['tag'] == 'kw') { if(strlen($valuearray['value']) > 3){ $kws[] = trim($valuearray['value']); } }elseif($valuearray['tag'] == 'ekw'){ $kws[] = trim($valuearray['value']); } } return implode(',',$kws); } return false; } function get_client_ip($type = 0) { $type = $type ? 1 : 0; static $ip = NULL; if ($ip !== NULL) return $ip[$type]; if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { $arr = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']); $pos = array_search('unknown',$arr); if(false !== $pos) unset($arr[$pos]); $ip = trim($arr[0]); }elseif (isset($_SERVER['HTTP_CLIENT_IP'])) { $ip = $_SERVER['HTTP_CLIENT_IP']; }elseif (isset($_SERVER['REMOTE_ADDR'])) { $ip = $_SERVER['REMOTE_ADDR']; } $long = sprintf("%u",ip2long($ip)); $ip = $long ? array($ip, $long) : array('0.0.0.0', 0); return $ip[$type]; } function zanpian_get_url($url,$timeout=10,$referer=""){ if(function_exists('curl_init')){ $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT,$timeout); if($referer){ curl_setopt ($ch, CURLOPT_REFERER, $referer); } $content = curl_exec($ch); $status = (int)curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); if($content && $status==200){ return $content; } } $ctx = stream_context_create(array('http'=>array('timeout'=>$timeout))); $content = @file_get_contents($url, 0, $ctx); if(strlen($content) == 0){ return false; } elseif($content){ return $content; } return false; } function zanpian_img_url($file,$default=""){ if(empty($file)){ $site_cssjsurl=config('site_cssjsurl'); $public=!empty($site_cssjsurl) ? $site_cssjsurl : config('site_path').PUBLIC_PATH.'tpl/'; return !empty($default) ? $default : $public."admin/no.jpg"; } if(strpos($file,'http://') !== false || strpos($file,'https://') !== false || strpos($file,'https://') !== false){ return $file; } $prefix = config('upload_http_prefix'); if(!empty($prefix)){ return $prefix.$file; }else{ return config('site_path').config('upload_path').'/'.$file; } } function zanpian_img_smallurl($file,$content="",$number=1){ if(empty($file)){ $site_cssjsurl=config('site_cssjsurl'); $public=!empty($site_cssjsurl) ? $site_cssjsurl : config('site_path').PUBLIC_PATH.'tpl/'; return $public."admin/no.jpg"; } if(!$file){ return zanpian_img_url_preg($file,$content,$number); } if(strpos($file,'http://') !== false || strpos($file,'https://') !== false || strpos($file,'https://') !== false){ return $file; } $prefix = config('upload_http_prefix'); if(!empty($prefix)){ return $prefix.$file; }else{ return config('site_path').config('upload_path').'-s/'.$file; } } function zanpian_img_url_preg($file,$content,$number=1){ preg_match_all('/<img(.*?)src="(.*?)(?=")/si',$content,$imgarr); preg_match_all('/(?<=src=").*?(?=")/si',implode('" ',$imgarr[0]).'" ',$imgarr); $countimg = count($imgarr); if($number > $countimg){ $number = $countimg; } return $imgarr[0][($number-1)]; } function zanpian_http_pic($contents) { if ($contents == null) return false; preg_match_all('/<img(.*?)src="(.*?)(?=")/si',$contents,$imgarr); preg_match_all('/(?<=src=").*?(?=")/si',implode('" ',$imgarr[0]).'" ',$imgarr); if (is_array($imgarr[0])) { return $imgarr[0]; } return false; } function zanpian_news_img_array($content,$type=""){ $prefix = config('upload_http_prefix'); $upload_path=config('site_path').config('upload_path').'/'; if ($content == null) return false; preg_match_all('/<img(.*?)src="(.*?)(?=")/si',$content,$imgarr); preg_match_all('/(?<=src=").*?(?=")/si',implode('" ',$imgarr[0]).'" ',$imgarr); if (is_array($imgarr[0])) { $picarray=$imgarr[0]; } $pathArr = array(); foreach($picarray as $key => $value) { if (strpos($value,'://')>0) { if(!empty($prefix)){ $pathArr[]=str_replace($prefix,"",$value); }else{ $pathArr[]=$value; } }else{ if($type==1){ $pathArr[]=str_replace($upload_path,"",$value); }elseif(!empty($prefix)){ $pathArr[]=$prefix.$value; }else{ $pathArr[]= $upload_path.$value; } } } if (is_array($pathArr)) { return str_ireplace($picarray,$pathArr,$content); } return $content; } function zanpian_news_images_array($content){ $content= preg_replace('/<img(.*?)>/si', "", $content); return $content; } function zanpian_content_images($value,$sid){ if(!empty($value)){ $content = zanpian_news_img_array($value,1); if(config('upload_http') && !empty($content) || config('upload_http_news') && $sid=="news" && !empty($content)){ $img = model('Img'); if (!!$path = zanpian_http_pic($content)) { $savePath = $img->down_load($path,$sid,''); $contents1 = str_ireplace($path, $savePath,$content); return $contents1; }else{ return $value; } }else{ return $content; } }else{ return $value; } } function zanpian_content_pic($content,$w=0,$sid="news"){ preg_match_all('/<img(.*?)src="(.*?)(?=")/si',$content,$imgarr); preg_match_all('/(?<=src=").*?(?=")/si',implode('" ',$imgarr[0]).'" ',$imgarr); $countimg = count($imgarr[0]); if($countimg== 1){ return $imgarr[0][0]; } if(!$w){ return $imgarr[0][0]; } foreach($imgarr[0] as $key=>$val){ if(strpos($val,'://')>0) { $val=$val; }else{ $val='./'.config('upload_path').'/'.$val; } $pic=getimagesize($val); if($w==1 && $pic[0] > $pic[1]){ return $val; }elseif($w==2 && $pic[0] < $pic[1]){ return $val; } } return $imgarr[0][0]; } function zanpian_img_url_array($content){ $contimg = config('news_images'); preg_match_all('/<img(.*?)(?=>)/si',$content,$imgarr); foreach($imgarr[0] as $key=>$value){ preg_match('/(?<=alt=").*?(?=")/si',$value,$title); preg_match('/(?<=src=").*?(?=")/si',$value,$imgurl); $array[$key]['img']=zanpian_img_url($imgurl[0]); $array[$key]['alt']=$title[0]; } $countarray = count($array); return $array; } function zanpian_img_file_array($content){ preg_match_all('/<img(.*?)(?=>)/si',$content,$imgarr); foreach($imgarr[0] as $key=>$value){ preg_match('/(?<=src=").*?(?=")/si',$value,$imgurl); if(strpos($imgurl[0],'://')==0) { $array[$key]=$imgurl[0]; } } $array=!empty($array) ? array_values($array) : ""; return $array; } function getpage($model,$params,$currentPage,$totalPages,$showrow,$halfPer=2){ $url = zanpian_list_url($model,$params,true,false); unset($params['p']); $first_url= zanpian_list_url($model,$params,true,false); $page = new \com\Page($totalPages,$showrow,$currentPage,$url,$first_url,$halfPer); return $page->myde_write(); } function gettoppage($model,$params,$currentPage,$totalPages,$halfPer=3,$url,$pagego=""){ if($currentPage== 2){ unset($params['p']); $first_url= zanpian_data_url($model,$params,true,false); $linkPage .='<li><a href="'.$first_url.'" class="prev" data="p-'.($currentPage-1).'">上一页</a></li>' ; }elseif($currentPage >1){ $linkPage .='<li><a href="'.str_replace('zanpianpage',($currentPage-1),$url).'" class="prev" data="p-'.($currentPage-1).'">上一页</a></li>' ; }else{ $linkPage .='<li class="disabled"><span>上一页</span></li>'; } if($currentPage < $totalPages){ $linkPage .='<li><a href="'.str_replace('zanpianpage',($currentPage+1),$url).'" class="next pagegbk" data="p-'.($currentPage+1).'">下一页</a></li>'; }else{ $linkPage .='<li class="disabled"><span>下一页</span></li>'; } return $linkPage; } function getpageprev($model,$params,$currentPage,$totalPages,$halfPer=5,$url=""){ $url = zanpian_list_url($model,$params,true,false); unset($params['p']); $first_url= zanpian_list_url($model,$params,true,false); if ($currentPage> 1){ $linkPage = str_replace('zanpianpage',($currentPage-1),$url); } if ($currentPage== 2){ $linkPage = $first_url; } return $linkPage; } function getpagenext($model,$params,$currentPage,$totalPages,$halfPer=5,$url=""){ $url = zanpian_list_url($model,$params,true,false); $linkPage .= ( $currentPage < $totalPages ) ? str_replace('zanpianpage',($currentPage+1),$url) : ''; return $linkPage; } function getnewspage($model,$params,$currentPage,$totalPages,$halfPer=5,$pagego="",$url=""){ $url = zanpian_list_url($model,$params,true,false); unset($params['p']); $first_url= zanpian_list_url($model,$params,true,false); if($currentPage== 2){ $linkPage .='<li><a href="'.$first_url.'" class="prev" data="p-'.($currentPage-1).'">上一页</a></li>' ; }elseif($currentPage >1){ $linkPage .='<li><a href="'.str_replace('zanpianpage',($currentPage-1),$url).'" class="prev" data="p-'.($currentPage-1).'">上一页</a></li>' ; }else{ $linkPage .='<li class="disabled"><span>上一页</span></li>'; } for($i=$currentPage-$halfPer,$i>1||$i=1,$j=$currentPage+$halfPer,$j<$totalPages||$j=$totalPages;$i<$j+1;$i++){ if($i == 1){ $linkPage .= ($i==$currentPage)?'<li class="active"><span>'.$i.'</span></li>':'<li><a href="'.str_replace('zanpianpage',$i,$first_url).'" data="p-'.$i.'">'.$i.'</a></li>'; }else{ $linkPage .= ($i==$currentPage)?'<li class="active"><span>'.$i.'</span></li>':'<li><a href="'.str_replace('zanpianpage',$i,$url).'" data="p-'.$i.'">'.$i.'</a></li>'; } } if($currentPage < $totalPages){ $linkPage .= '<li><a href="'.str_replace('zanpianpage',($currentPage+1),$url).'" class="next pagegbk" data="p-'.($currentPage+1).'">下一页</a></li>'; }else{ $linkPage .= '<li class="disabled"><span>下一页</span></li>'; } return $linkPage; } function url_user_route($model,$params,$redirect=true,$suffix=false){ $suffix=config('site_path'); $url_rules = config('route_rules'); $array_key = explode('/',$model); if(is_array($params)){ foreach($params as $key=>$value){ array_push($array_key, $key); } } $key = implode('/',$array_key); if($url_rules[$key]){ if($url_rules[$key]['find']==1){ $url=$url_rules[$key]['replace']; }else{ $url = str_replace('','',str_replace($url_rules[$key]['find'],$params,$url_rules[$key]['replace'])); } if(!empty($url)){ if(substr($url_rules[$key]['replace'],-1)=="/"){ return $suffix.$url; }else{ if($model=='home/map/show'){ return $suffix.$url.".xml"; }else{ return $suffix.$url.".".config('url_html_suffix'); } } } } } function zp_url($model,$params="",$redirect=true,$suffix=false){ return str_replace('index.php?s=/','index.php?s=',url($model,$params,$redirect,$suffix)); } function zanpian_url($model,$params="",$redirect=true,$suffix=false){ $model=strtolower($model); $config=config(); $reurl=""; if(!empty($config['url_rewrite'])){ if(!empty($config['user_rewrite'])){ $reurl = url_user_route($model,$params,$redirect,$suffix); } if(!empty($reurl)){ return $reurl; }else{ if(is_array($params)){ unset($params['pinyin']); unset($params['cid']); unset($params['dir']); } $reurl=str_replace('index.php?s=/','index.php?s=',url($model,$params,$redirect,$suffix)); if(!config('url_html')){ return str_replace(array('index.php'),'',urldecode($reurl)); } return $reurl; } }else{ $reurl=str_replace('index.php?s=/','index.php?s=',url($model,$params,$redirect,$suffix)); if(!config('url_html')){ return str_replace(array('index.php'),'',urldecode($reurl)); } return $reurl; } } function zanpian_user_url($model,$params="",$redirect=true,$suffix=false){ return zanpian_url($model,$params,$redirect,$suffix); } function zanpian_list_url($model="home/vod/read",$arrurl="",$redirect=true,$suffix=false){ return zanpian_data_url($model,$arrurl,$redirect,$suffix); } function zanpian_type_url($model="home/vod/type",$arrurl="",$redirect=true,$suffix=false){ return zanpian_data_url($model,$arrurl,$redirect,$suffix); } function zanpian_data_url($model="home/vod/read",$arrurl="",$redirect=true,$suffix=false){ $config=config(); if (!empty($arrurl['jumpurl'])) { return $arrurl['jumpurl']; } if(empty($config['url_rewrite']) || !empty($config['url_rewrite']) && empty($config['user_rewrite'])){ unset($arrurl['pinyin']); unset($arrurl['cid']); unset($arrurl['dir']); } unset($arrurl['jumpurl']); if($arrurl['p'] > 1){ $arrurl['p'] = 'zanpianpage'; }elseif($arrurl['p']== 1){ unset($arrurl['p']); } return zanpian_url($model,$arrurl,$redirect,$suffix); } function zanpian_play_url($arrurl){ $config=config(); if(empty($config['url_rewrite']) || !empty($config['url_rewrite']) && empty($config['user_rewrite'])){ unset($arrurl['pinyin']); unset($arrurl['cid']); unset($arrurl['dir']); } return zanpian_url('home/vod/play',$arrurl,true,false); } function seokeywords($name,$key=3){ $urlarray=config('http_api'); $rand = array_rand($urlarray,1); $apiurl="http://".$urlarray[$rand]."/zanpiancms/seo.php?name=".$name."&k=".$key; $data= zanpian_get_url($apiurl,15); $d=json_decode($data,true); $c=explode(',',$d['keywords']); if(!empty($d) && count($c)>1){ return $d['keywords'] ; }else{ return false; } } function param_url(){ $where = array(); $where['sid'] = input('sid/d',''); $where['pid'] = input('pid/d',''); $where['id'] = input('id/d',''); $where['op'] = input('op/d',''); $where['vid'] = input('vid/d',''); $where['uid'] = input('uid/d',''); $where['pinyin'] = htmlspecialchars(input('pinyin/s','')); $where['cid'] = input('cid/d',''); $where['dir'] = htmlspecialchars(input('dir/s','')); $where['listdir'] = htmlspecialchars(input('listdir/s','')); $where['letter'] = htmlspecialchars(input('letter/s','')); $where['tag'] = htmlspecialchars(urldecode(trim(input('tag/s','')))); $where['wd'] = htmlspecialchars(urldecode(trim(input('wd/s','')))); $where['play'] = htmlspecialchars(urldecode(trim(input('play/s','')))); $where['year'] = input('year/d',''); $where['language'] = htmlspecialchars(urldecode(trim(input('language/s','')))); $where['area'] = htmlspecialchars(urldecode(trim(input('area/s','')))); $where['actor'] = htmlspecialchars(urldecode(trim(input('actor/s','')))); $where['director'] = htmlspecialchars(urldecode(trim(input('director/s','')))); $where['stars'] = input('stars/d',''); $where['zy'] = htmlspecialchars(urldecode(trim(input('zy/s','')))); $where['xb'] = htmlspecialchars(urldecode(trim(input('xb/s','')))); $where['sex'] = htmlspecialchars(urldecode(trim(input('sex/s','')))); $where['type'] = htmlspecialchars(urldecode(trim(input('type/s','')))); $where['filmtime'] = htmlspecialchars(input('filmtime/s','up')); $where['mcid'] = input('mcid/d',''); $where['lz'] = input('lz/d',''); $where['picm'] = input('picm/d',''); $where['limit'] = input('limit/d',''); $where['page'] = input('p/d',1); $where['order'] = order_by(input('order/s',"")); $where['p'] = input('p/d',1); return $where; } function param_jump($where){ if(!empty($where['sid'])){ $jumpurl['sid'] = $where['sid']; } if(!empty($where['id'])){ $jumpurl['id'] = $where['id']; } if(!empty($where['pid'])){ $jumpurl['pid'] = $where['pid']; } if(!empty($where['op'])){ $jumpurl['op'] = $where['op']; } if(!empty($where['pinyin'])){ $jumpurl['pinyin'] = $where['pinyin']; } if(!empty($where['cid'])){ $jumpurl['cid'] = $where['cid']; } if(!empty($where['listdir'])){ $jumpurl['listdir'] = $where['listdir']; } if(!empty($where['letter'])){ $jumpurl['letter'] = $where['letter']; } if(!empty($where['name'])){ $jumpurl['name'] = urlencode($where['name']); } if(!empty($where['aliases'])){ $jumpurl['aliases'] = urlencode($where['aliases']); } if(!empty($where['tag'])){ $jumpurl['tag'] = urlencode($where['tag']); } if(!empty($where['wd'])){ $jumpurl['wd'] = urlencode($where['wd']); } if(!empty($where['play'])){ $jumpurl['play'] = $where['play']; } if(!empty($where['year'])){ $jumpurl['year'] = $where['year']; } if(!empty($where['language'])){ $jumpurl['language'] = urlencode($where['language']); } if(!empty($where['area'])){ $jumpurl['area'] = urlencode($where['area']); } if(!empty($where['actor'])){ $jumpurl['actor'] = urlencode($where['actor']); } if(!empty($where['director'])){ $jumpurl['director'] = urlencode($where['director']); } if(!empty($where['stars'])){ $jumpurl['stars'] = $where['stars']; } if(!empty($where['zy'])){ $jumpurl['zy'] = urlencode($where['zy']); } if(!empty($where['xb'])){ $jumpurl['xb'] = urlencode($where['xb']); } if(!empty($where['type'])) { $jumpurl['type'] = $where['type']; } if(!empty($where['mcid'])) { $jumpurl['mcid'] = $where['mcid']; } if(!empty($where['lz'])) { $jumpurl['lz'] = $where['lz']; } if(!empty($where['picm'])) { $jumpurl['picm'] = $where['picm']; } if($where['order'] != 'addtime' && $where['order']){ $jumpurl['order'] = $where['order']; } $jumpurl['p'] = ''; return $jumpurl; } function order_by($order = 'addtime'){ if(empty($order)){ return 'addtime'; } $array = array(); $array['addtime'] = 'addtime'; $array['id'] = 'id'; $array['hits'] = 'hits'; $array['hits_month'] = 'hits_month'; $array['hits_week'] = 'hits_week'; $array['stars'] = 'stars'; $array['up'] = 'up'; $array['down'] = 'down'; $array['gold'] = 'gold'; $array['golder'] = 'golder'; $array['year'] = 'year'; $array['letter'] = 'letter'; $array['filmtime'] = 'filmtime'; $array['oid'] = 'oid'; return $array[trim($order)]; } function param_lable($tag = ''){ $param = array(); $array = explode(';',str_replace('num:','limit:',$tag)); foreach ($array as $v){ list($key,$val) = explode(':',trim($v)); $param[trim($key)] = trim($val); } return $param; } function mysql_param($tag){ $params = array(); $params['limit']= !empty($tag['limit']) ? $tag['limit'] : '10'; $params['order']= !empty($tag['order']) ? $tag['order'] : ''; $params['page']= !empty($tag['page']) ? $tag['page'] : false; $params['p']= !empty($tag['p']) ? $tag['p'] : ''; if(!empty($tag['cahce_name']) == 'default' || empty($tag['cahce_name'])){ $params['cache_name'] = md5(config('cache_prefix').implode('_',$tag)); }else{ $params['cache_name']= !empty($tag['cache_name']) ? md5(config('cache_prefix').'_'.$tag['cache_name']) : ''; } $params['cache_time']= !empty($tag['cahce_time']) ? intval($tag['cahce_time']) : intval(config('data_cache_foreach')); return $params; } function zanpian_mysql_vod($tag){ $tag = param_lable($tag); $tag['field']= !empty($tag['field']) ? $tag['field'] : 'vod_id,vod_cid,vod_mcid,vod_name,vod_aliases,vod_title,vod_color,vod_actor,vod_director,vod_content,vod_pic,vod_bigpic,vod_diantai,vod_tvcont,vod_tvexp,vod_area,vod_language,vod_year,vod_continu,vod_total,vod_isend,vod_addtime,vod_hits,vod_hits_day,vod_hits_week,vod_hits_month,vod_hits_lasttime,vod_stars,vod_up,vod_down,vod_play,vod_gold,vod_golder,vod_isfilm,vod_filmtime,vod_length,vod_weekday,vod_letters,vod_bigpic,vod_jumpurl'; $params=mysql_param($tag); if($params['cache_name'] && $params['cache_time']){ $data_cache_content = Cache::get($params['cache_name']); if($data_cache_content){ return $data_cache_content; } } $where = array(); if (!empty($tag['ids'])) { $where['vod_id'] = array('in',$tag['ids']); } if (!empty($tag['cid'])) { $cids = explode(',',trim($tag['cid'])); if (count($cids) > 1) { $where['vod_cid'] = array('in',getlistarr_tag($cids)); }else{ $where['vod_cid'] = getlistsqlin($tag['cid']); } } if (!empty($tag['names'])) { $where['vod_name'] = array('in',$tag['names']); } if (!empty($tag['day'])) { $where['vod_addtime'] = array('gt',getxtime($tag['day'])); } if (!empty($tag['filmtime'])) { if($tag['filmtime']=='ls'){ $where['vod_filmtime'] = array('between',array(strtotime("-2 month",time()),time())); } else{ $where['vod_filmtime'] = array('gt', time()); } } if (!empty($tag['name'])) { $where['vod_name'] = array('like','%'.$tag['name'].'%'); } if (!empty($tag['likename'])) { $where['vod_name'] = array('like',$tag['vname'].'%'); } if (!empty($tag['title'])) { $where['vod_title'] = array('like','%'.$tag['title'].'%'); } if(!empty($tag['tj'])){ $tjinfo=explode('|',trim($tag['tj'])); if($tjinfo[3]){ $where[$tjinfo[3]] = array($tjinfo[1],$tjinfo[2]); }else{ $where[$tjinfo[0]] = array($tjinfo[1],$tjinfo[2]); } } if(!empty($tag['no'])){ $where['vod_id'] = array('neq',$tag['no']); } if (!empty($tag['play'])) { $where['vod_play'] = array('eq',$tag['play']); } if (!empty($tag['inputer'])) { $where['vod_inputer'] = array('eq',$tag['inputer']); } if (!empty($tag['wd'])) { $where['vod_name|vod_actor|vod_director'] = array('like','%'.$tag['wd'].'%'); } if (!empty($tag['yanyuan'])) { $where['vod_actor|vod_director'] = array('like','%'.$tag['yanyuan'].'%'); } if (!empty($tag['stars'])) { $where['vod_stars'] = array('in',$tag['stars']); } if(!empty($tag['isfiml'])){ $where['vod_isfiml'] = array('eq',$tag['isfiml']); } if (!empty($tag['letter'])) { $letter = explode(',',$tag['letter']); if (count($letter)>1) { $where['vod_letter'] = array('in',$tag['letter']); }else{ $where['vod_letter'] = array('eq',$letter[0]); } } if (!empty($tag['area'])) { $where['vod_area'] = array('eq',''.$tag['area'].''); } if (!empty($tag['language'])) { $where['vod_language'] = array('eq',''.$tag['language'].''); } if(!empty($tag['lz']) == 1){ $where['vod_continu'] = array('neq','0'); }elseif(!empty($tag['lz']) == 2){ $where['vod_continu'] = 0; } if (!empty($tag['year'])) { $year = explode(',',$tag['year']); if (count($year) > 1) { $where['vod_year'] = array('between',$year[0].','.$year[1]); }else{ $where['vod_year'] = array('eq',$tag['year']); } } if (!empty($tag['hits'])) { $hits = explode(',',$tag['hits']); if (count($hits) > 1) { $where['vod_hits'] = array('between',$hits[0].','.$hits[1]); }else{ $where['vod_hits'] = array('gt',$hits[0]); } } if(!empty($tag['gold'])) { $gold = explode(',',$tag['gold']); if (count($gold) > 1) { $where['vod_gold'] = array('between',$gold[0].','.$gold[1]); }else{ $where['vod_gold'] = array('gt',$gold[0]); } } if(!empty($tag['golder'])) { $golder = explode(',',$tag['golder']); if (count($golder) > 1) { $where['vod_golder'] = array('between',$golder[0].','.$golder[1]); }else{ $where['vod_golder'] = array('gt',$golder[0]); } } if(!empty($tag['up'])) { $up = explode(',',$tag['up']); if (count($up)>1) { $where['vod_up'] = array('between',$up[0].','.$up[1]); }else{ $where['vod_up'] = array('gt',$up[0]); } } if(!empty($tag['down'])) { $down = explode(',',$tag['down']); if (count($down)>1) { $where['vod_down'] = array('between',$down[0].','.$down[1]); }else{ $where['vod_down'] = array('gt',$down[0]); } } if(!empty($tag['group'])) { $group=$tag['group']; }else{ $group = FALSE; } $where['vod_status'] = array('eq',1); if(!empty($tag['tag'])){ $where['tag_name'] = array('eq',$tag['tag']); $where['tag_sid'] = 1; if($group){ $rs = db('tag')->alias('t')->join('vod v','v.vod_id = t.tag_id','RIGHT')->group($group); }else{ $rs = db('tag')->alias('t')->join('vod v','v.vod_id = t.tag_id','RIGHT'); } }elseif(!empty($tag['mcid'])){ $mcid=explode(',',$tag['mcid']); if(count($mcid)>1){ $where['mcid_mid']=array('in',$tag['mcid']); }else{ $where['mcid_mid'] = array('eq',$tag['mcid']); } if($group){ $rs = db('mcid')->alias('m')->join('vod v','v.vod_id = m.mcid_id','RIGHT')->group($group); }else{ $rs = db('mcid')->alias('m')->join('vod v','v.vod_id = m.mcid_id','RIGHT'); } }elseif(!empty($tag['weekday'])){ $week=explode(',',$tag['weekday']); if(count($week)>1){ $where['weekday_cid']=array('in',$tag['weekday']); }else{ $where['weekday_cid'] = array('eq',$tag['weekday']); } $where['weekday_sid'] = 1; $rs = db('weekday')->alias('w')->join('vod v','v.vod_id = w.weekday_id','RIGHT')->group('vod_id'); }elseif(!empty($tag['diantai'])){ $week=explode(',',$tag['diantai']); if(count($week)>1){ $where['vodtv_name']=array('in',$tag['diantai']); }else{ $where['vodtv_name'] = array('eq',$tag['diantai']); } $where['vodtv_sid'] = 1; $rs = db('vodtv')->alias('t')->join('vod v','v.vod_id = t.vodtv_id','RIGHT')->group('vod_id'); }elseif(!empty($tag['prty'])){ $week=explode(',',$tag['prty']); if(count($week)>1){ $where['prty_cid']=array('in',$tag['prty']); }else{ $where['prty_cid'] = array('eq',$tag['prty']); } $where['prty_sid'] = 1; $rs = db('prty')->alias('p')->join('vod v','v.vod_id = p.prty_id','RIGHT')->group('vod_id'); }elseif(!empty($tag['actor'])){ $actor=explode(',',$tag['actor']); if(count($actor)>1){ $where['actors_name']=array('in',$tag['actor']); $where['actors_type']=1; }else{ $where['actors_name'] = $tag['actor']; $where['actors_type']=1; } $rs = db('actors')->alias('a')->join('vod v','v.vod_id = a.actors_id','RIGHT')->group('actors_id'); }elseif(!empty($tag['director'])){ $actor=explode(',',$tag['director']); if(count($actor)>1){ $where['actors_name']=array('in',$tag['director']); $where['actors_type']=2; }else{ $where['actors_name'] = $tag['director']; $where['actors_type']=2; } $rs = db('actors')->alias('a')->join('vod v','v.vod_id = a.actors_id','RIGHT')->group('actors_id'); }else{ $rs=db('vod'); } if(!empty($params['page'])){ $list=$rs->field($tag['field'])->where($where)->order(trim($params['order']))->paginate($params['limit'],false,['page'=>config('currentpage')]); $data =$list->all(); if(!empty($data[0])){ $data[0]['page']['pagecount'] = $list->total(); $data[0]['page']['totalpage'] = $list->lastPage(); $data[0]['page']['currentpage'] =$list->currentPage(); $data[0]['page']['pageprevurl']= getpageprev(config('model'),config('params'),$data[0]['page']['currentpage'],$data[0]['page']['totalpage'],config('home_pagenum')); $data[0]['page']['pagenexturl']= getpagenext(config('model'),config('params'),$data[0]['page']['currentpage'],$data[0]['page']['totalpage'],config('home_pagenum')); $data[0]['page']['pageurl']= getpage(config('model'),config('params'),$data[0]['page']['currentpage'],$data[0]['page']['pagecount'],$params['limit'],config('home_pagenum')); } }else{ $data=$rs->field($tag['field'])->where($where)->limit($params['limit'])->order(trim($params['order']))->select(); } foreach($data as $key=>$val){ $data[$key]['list_id'] = $val['vod_cid']; $data[$key]['list_name'] = getlistname($val['vod_cid'],'list_name'); $data[$key]['list_url'] = getlistname($val['vod_cid'],'list_url'); $data[$key]['vod_readurl'] = zanpian_data_url('home/vod/read',array('id'=>$val['vod_id'],'pinyin'=>$val['vod_letters'],'cid'=>$val['vod_cid'],'dir'=>getlistname($val['vod_cid'],'list_dir'),'jumpurl'=>$val['vod_jumpurl'])); $data[$key]['vod_playurl'] = zanpian_play_url(array('id'=>$val['vod_id'],'pinyin'=>$val['vod_letters'],'cid'=>$val['vod_cid'],'dir'=>getlistname($val['vod_cid'],'list_dir'),'sid'=>0,'pid'=>1)); $data[$key]['vod_picurl'] = zanpian_img_url($val['vod_pic']); $data[$key]['vod_bigpicurl'] = zanpian_img_url($val['vod_bigpic']); $data[$key]['vod_picurl_small'] = zanpian_img_smallurl($val['vod_pic']); } if(!empty($params['cache_name']) && !empty($params['cache_time'])){ Cache::tag('foreach_vod')->set($params['cache_name'],$data,intval($params['cache_time'])); } return $data; } function zanpian_mysql_news($tag){ $tag = param_lable($tag); $tag['field']= !empty($tag['field']) ? $tag['field'] : 'news_id,news_cid,news_name,news_mid,news_color,news_pic,news_remark,news_hits,news_hits_day,news_hits_week,news_hits_month,news_stars,news_up,news_down,news_gold,news_golder,news_addtime,news_jumpurl,news_playname,news_clarity,news_playtime,news_playurl'; $params=mysql_param($tag); if(!empty($params['cache_name']) && !empty($params['cache_time'])){ $data_cache_content = Cache::get($params['cache_name']); if($data_cache_content){ return $data_cache_content; } } $where = array(); $where['news_status'] = array('eq',1); if(!empty($tag['ids'])) { $where['news_id'] = array('in',$tag['ids']); } if (!empty($tag['cid'])) { $cids = explode(',',trim($tag['cid'])); if (count($cids) > 1) { $where['news_cid'] = array('in',getlistarr_tag($cids)); }else{ $where['news_cid'] = getlistsqlin($tag['cid']); } } if (!empty($tag['day'])) { $where['news_addtime'] = array('gt',getxtime($tag['day'])); } if (!empty($tag['stars'])) { $where['news_stars'] = array('in',$tag['stars']); } if (!empty($tag['letter'])) { $letter = explode(',',$tag['letter']); if (count($letter)>1) { $where['news_letter'] = array('in',$tag['letter']); }else{ $where['news_letter'] = array('eq',$letter[0]); } } if (!empty($tag['hits'])) { $hits = explode(',',$tag['hits']); if (count($hits) > 1) { $where['news_hits'] = array('between',$hits[0].','.$hits[1]); }else{ $where['news_hits'] = array('gt',$hits[0]); } } if (!empty($tag['name'])) { $where['news_name'] = array('like','%'.$tag['name'].'%'); } if (!empty($tag['wd'])) { $where['news_name|news_remark'] = array('like','%'.$tag['wd'].'%'); } if(!empty($tag['no'])){ $where['news_id'] = array('neq',$tag['no']); } if (!empty($tag['gold'])) { $gold = explode(',',$tag['gold']); if (count($gold) > 1) { $where['news_gold'] = array('between',$gold[0].','.$gold[1]); }else{ $where['news_gold'] = array('gt',$gold[0]); } } if (!empty($tag['golder'])) { $golder = explode(',',$tag['golder']); if (count($golder) > 1) { $where['news_golder'] = array('between',$golder[0].','.$golder[1]); }else{ $where['news_golder'] = array('gt',$golder[0]); } } if (!empty($tag['up'])) { $up = explode(',',$tag['up']); if (count($up)>1) { $where['news_up'] = array('between',$up[0].','.$up[1]); }else{ $where['news_up'] = array('gt',$up[0]); } } if (!empty($tag['down'])) { $down = explode(',',$tag['down']); if (count($down)>1) { $where['news_down'] = array('between',$down[0].','.$down[1]); }else{ $where['news_down'] = array('gt',$down[0]); } } if(!empty($tag['tag'])){ $where['tag_name'] = array('eq',$tag['tag']); $where['tag_sid'] = 2; $rs = db('tag')->alias('t')->join('news n','n.news_id = t.tag_id','RIGHT'); }elseif(!empty($tag['news'])){ if(!empty($tag['sid'])){ $where['newsrel_sid'] = $tag['sid']; } if(!empty($tag['did'])){ $where['newsrel_did'] = $tag['did']; $whereor['newsrel_name'] = $tag['news']; }else{ $where['newsrel_name'] = $tag['news']; } $rs = db('newsrel')->alias('s')->join('news n','n.news_id = s.newsrel_nid','RIGHT'); }elseif(!empty($tag['prty'])){ $where['prty_sid'] = 2; $week=explode(',',$tag['prty']); if(count($week)>1){ $where['prty_cid']=array('in',$tag['prty']); }else{ $where['prty_cid'] = array('eq',$tag['prty']); } $rs = db('prty')->alias('p')->join('news n','n.news_id = p.prty_id','RIGHT'); }else{ $rs=db('news'); } if(!empty($params['page'])){ $pageurl = urldecode(config('jumpurl')); $list=$rs->field($tag['field'])->where($where)->order(trim($params['order']))->paginate($params['limit'],false,['page'=>config('currentpage')]); $data =$list->all(); if(!empty($data[0])){ $data[0]['page']['pagecount'] = $list->total(); $data[0]['page']['totalpage'] = $list->lastPage(); $data[0]['page']['currentpage'] =$list->currentPage(); $data[0]['page']['pageprevurl']= getpageprev(config('model'),config('params'),$data[0]['page']['currentpage'],$data[0]['page']['totalpage'],config('home_pagenum')); $data[0]['page']['pagenexturl']= getpagenext(config('model'),config('params'),$data[0]['page']['currentpage'],$data[0]['page']['totalpage'],config('home_pagenum')); $data[0]['page']['pageurl']= getpage(config('model'),config('params'),$data[0]['page']['currentpage'],$data[0]['page']['pagecount'],$params['limit'],config('home_pagenum')); } }else{ $data=$rs->field($tag['field'])->where($where)->limit($params['limit'])->order(trim($params['order']))->select(); } foreach($data as $key=>$val){ $data[$key]['list_id'] = $val['news_cid']; $data[$key]['list_name'] = getlistname($val['news_cid'],'list_name'); $data[$key]['list_url'] = getlistname($val['news_cid'],'list_url'); $data[$key]['news_readurl'] = zanpian_data_url('home/news/read',array('id'=>$val['news_id'],'cid'=>$val['news_cid'],'dir'=>getlistname($val['news_cid'],'list_dir'),'jumpurl'=>$val['news_jumpurl'])); $data[$key]['news_picurl'] = zanpian_img_url($val['news_pic']); $data[$key]['news_picurl_small'] = zanpian_img_smallurl($val['news_pic']); } if(!empty($params['cache_name']) && !empty($params['cache_time'])){ Cache::tag('foreach_news')->set($params['cache_name'],$data,intval($params['cache_time'])); } return $data; } function zanpian_mysql_star($tag){ $tag = param_lable($tag); $tag['field']= !empty($tag['field']) ? $tag['field'] : 'star_id,star_cid,star_name,star_bm,star_wwm,star_letters,star_tag,star_letter,star_color,star_bgcolor,star_pig,star_pic,star_bigpic,star_xb,star_sg,star_tz,star_mz,star_cstime,star_school,star_gs,star_weibo,star_work,star_guanxi,star_zy,star_xz,star_xx,star_area,star_gj,star_csd,star_content,star_jumpurl,star_hits,star_hits_day,star_hits_week,star_hits_month,star_addtime,star_stars,star_up,star_down'; $params=mysql_param($tag); if(!empty($params['cache_name']) && !empty($params['cache_time'])){ $data_cache_content = Cache::get($params['cache_name']); if($data_cache_content){ return $data_cache_content; } } $where = array(); if (!empty($tag['ids'])) { $where['star_id'] = array('in',$tag['ids']); } if (!empty($tag['cid'])) { $cids = explode(',',trim($tag['cid'])); if (count($cids) > 1) { $where['star_cid'] = array('in',getlistarr_tag($cids)); }else{ $where['star_cid'] = getlistsqlin($tag['cid']); } } if (!empty($tag['day'])) { $where['star_addtime'] = array('gt',getxtime($tag['day'])); } if (!empty($tag['stars'])) { $where['star_stars'] = array('in',$tag['stars']); } if (!empty($tag['letter'])) { $letter = explode(',',$tag['letter']); if (count($letter)>1) { $where['star_letter'] = array('in',$tag['letter']); }else{ $where['star_letter'] = array('eq',$letter[0]); } } if (!empty($tag['xb'])) { $where['star_xb'] = array('eq',$tag['xb']); } if (!empty($tag['sex'])) { $where['star_xb'] = array('eq',$tag['sex']); } if (!empty($tag['area'])) { $area = explode(',',$tag['area']); if (count($area)>1) { $where['star_area'] = array('in',$tag['area']); }else{ $where['star_area'] = array('like','%'.$tag['area'].'%'); } } if (!empty($tag['zy'])) { $zy = explode(',',$tag['zy']); if (count($zy)>1) { $where['star_zy'] = array('in',$tag['zy']); }else{ $where['star_zy'] = array('like','%'.$tag['zy'].'%'); } } if (!empty($tag['guanxi'])) { $where['star_guanxi'] = array('like','%'.$tag['guanxi'].'%'); } if (!empty($tag['work'])) { $where['star_work'] = array('like','%'.$tag['work'].'%'); } if (!empty($tag['stararea'])) { $where['star_area'] = array('in',$tag['stararea']); } if (!empty($tag['name'])) { $where['star_name'] = array('like','%'.$tag['name'].'%'); } if (!empty($tag['starname'])) { $where['star_name'] = array('in',$tag['starname']); } if (!empty($tag['wd'])) { $where['star_name|star_area|star_zy|star_csd|star_work|star_gx|star_content|star_info'] = array('like','%'.$tag['wd'].'%'); } if(!empty($tag['no'])){ $where['star_id'] = array('neq',$tag['no']); } if (!empty($tag['hits'])) { $hits = explode(',',$tag['hits']); if (count($hits) > 1) { $where['star_hits'] = array('between',$hits[0].','.$hits[1]); }else{ $where['star_hits'] = array('gt',$hits[0]); } } if (!empty($tag['up'])) { $up = explode(',',$tag['up']); if (count($up)>1) { $where['star_up'] = array('between',$up[0].','.$up[1]); }else{ $where['star_up'] = array('gt',$up[0]); } } if (!empty($tag['down'])) { $down = explode(',',$tag['down']); if (count($down)>1) { $where['star_down'] = array('between',$down[0].','.$down[1]); }else{ $where['star_down'] = array('gt',$down[0]); } } if (!empty($tag['tj'])){ $tjinfo=explode('|',trim($tag['tj'])); if($tjinfo[3]){ $where[$tjinfo[3]] = array($tjinfo[1],$tjinfo[2]); }else{ $where[$tjinfo[0]] = array($tjinfo[1],$tjinfo[2]); } } if(!empty($tag['tag'])){ $where['tag_name'] = array('eq',$tag['tag']); $where['tag_sid'] = 3; $rs = db('tag')->alias('t')->join('star s','s.star_id = t.tag_id','RIGHT'); }elseif(!empty($tag['prty'])){ $where['prty_sid'] = 3; $week=explode(',',$tag['prty']); if(count($week)>1){ $where['prty_cid']=array('in',$tag['prty']); }else{ $where['prty_cid'] = array('eq',$tag['prty']); } $rs = db('prty')->alias('p')->join('stat s','s.star_id = p.prty_id','RIGHT'); }else{ $rs=db('star'); } $where['star_status'] = array('eq',1); if(!empty($params['page'])){ $pageurl = urldecode(config('jumpurl')); $list=$rs->field($tag['field'])->where($where)->order(trim($params['order']))->paginate($params['limit'],false,['page'=>config('currentpage')]); $data =$list->all(); if(!empty($data[0])){ $data[0]['page']['pagecount'] = $list->total(); $data[0]['page']['totalpage'] = $list->lastPage(); $data[0]['page']['currentpage'] =$list->currentPage(); $data[0]['page']['pageprevurl']= getpageprev(config('model'),config('params'),$data[0]['page']['currentpage'],$data[0]['page']['totalpage'],config('home_pagenum')); $data[0]['page']['pagenexturl']= getpagenext(config('model'),config('params'),$data[0]['page']['currentpage'],$data[0]['page']['totalpage'],config('home_pagenum')); $data[0]['page']['pageurl']= getpage(config('model'),config('params'),$data[0]['page']['currentpage'],$data[0]['page']['pagecount'],$params['limit'],config('home_pagenum')); } }else{ $data=$rs->field($tag['field'])->where($where)->limit($params['limit'])->order(trim($params['order']))->select(); } foreach($data as $key=>$val){ $data[$key]['list_id'] = $val['star_cid']; $data[$key]['list_name'] = getlistname($val['star_cid'],'list_name'); $data[$key]['list_url'] = getlistname($val['star_cid'],'list_url'); $data[$key]['star_readurl'] = zanpian_data_url('home/star/read',array('id'=>$val['star_id'],'pinyin'=>$val['star_letters'],'cid'=>$val['star_cid'],'dir'=>getlistname($val['star_cid'],'list_dir'),'jumpurl'=>$val['star_jumpurl'])); $data[$key]['star_picurl'] = zanpian_img_url($val['star_pic']); $data[$key]['star_bigpicurl'] = zanpian_img_url($val['star_bigpic']); $data[$key]['star_picurl_small'] = zanpian_img_smallurl($val['star_pic']); } if(!empty($params['cache_name']) && !empty($params['cache_time'])){ Cache::tag('foreach_star')->set($params['cache_name'],$data,intval($params['cache_time'])); } return $data; } function zanpian_mysql_starhz($tag){ $tag = param_lable($tag); $tag['field']= !empty($tag['field']) ? $tag['field'] : '*'; $tag['order']= !empty($tag['order']) ? $tag['order'] : 'star_addtime desc'; $params=mysql_param($tag); if(!empty($params['cache_name']) && !empty($params['cache_time'])){ $data_cache_content = Cache::get($params['cache_name']); if($data_cache_content){ return $data_cache_content; } } $where = array(); $where['star_status'] = array('eq',1); if(!empty($tag['star'])){ $vodid=db('actors')->field('actors_id')->where('actors_name',$tag['star'])->select(); foreach($vodid as $val){ $arrid[] = $val['actors_id']; } $arrayvid = @implode(',', $arrid); $stararray=db('actors')->field('actors_name')->where('actors_id','in',$arrayvid)->select(); foreach($stararray as $key=>$val){ if($val['actors_name']!=$tag['star']){ $arrstar[$val['actors_name']] = $val['actors_name']; } } if(!empty($tag['guanxi'])){ $guanxi=@explode(',',$tag['guanxi']); $arrstar=@array_merge($guanxi,$arrstar); } $arraystar = @implode(',', @array_unique($arrstar)); $where['star_name'] = array('neq',$tag['star']); } $where['star_name'] = array('in',$arraystar); $rs=db('star'); if(!empty($params['page'])){ $pageurl = urldecode(config('jumpurl')); $list=$rs->field($tag['field'])->where($where)->order(trim($params['order']))->paginate($params['limit'],false,['page'=>config('currentpage')]); $data =$list->all(); if(!empty($data[0])){ $data[0]['page']['pagecount'] = $list->total(); $data[0]['page']['totalpage'] = $list->lastPage(); $data[0]['page']['currentpage'] =$list->currentPage(); $data[0]['page']['pageprevurl']= getpageprev(config('model'),config('params'),$data[0]['page']['currentpage'],$data[0]['page']['totalpage'],config('home_pagenum')); $data[0]['page']['pagenexturl']= getpagenext(config('model'),config('params'),$data[0]['page']['currentpage'],$data[0]['page']['totalpage'],config('home_pagenum')); $data[0]['page']['pageurl']= getpage(config('model'),config('params'),$data[0]['page']['currentpage'],$data[0]['page']['pagecount'],$params['limit'],config('home_pagenum')); } }else{ $data=$rs->field($tag['field'])->where($where)->limit($params['limit'])->order(trim($params['order']))->select(); } foreach($data as $key=>$val){ $data[$key]['list_id'] = $val['star_cid']; $data[$key]['list_name'] = getlistname($val['star_cid'],'list_name'); $data[$key]['list_url'] = getlistname($val['star_cid'],'list_url'); $data[$key]['star_readurl'] = zanpian_data_url('home/star/read',array('id'=>$val['star_id'],'pinyin'=>$val['star_letters'],'cid'=>$val['star_cid'],'dir'=>getlistname($val['star_cid'],'list_dir'),'jumpurl'=>$val['star_jumpurl'])); $data[$key]['star_picurl'] = zanpian_img_url($val['star_pic']); $data[$key]['star_bigpicurl'] = zanpian_img_url($val['star_bigpic']); $data[$key]['star_picurl_small'] = zanpian_img_smallurl($val['star_pic']); } if(!empty($params['cache_name']) && !empty($params['cache_time'])){ Cache::tag('foreach_starhz')->set($params['cache_name'],$data,intval($params['cache_time'])); } return $data; } function zanpian_mysql_story($tag){ $tag = param_lable($tag); $tag['field']= !empty($tag['field']) ? $tag['field'] : 'story_id,story_cid,story_vid,story_addtime,story_hits,story_hits_day,story_hits_week,story_hits_month,story_continu,story_cont,story_title,story_page,story_stars,vod_id,vod_cid,vod_letters,vod_name,vod_mcid,vod_content,vod_pic,vod_director,vod_actor,vod_year,vod_gold,vod_hits,vod_addtime,vod_jumpurl'; $params=mysql_param($tag); if(!empty($params['cache_name']) && !empty($params['cache_time'])){ $data_cache_content = Cache::get($params['cache_name']); if($data_cache_content){ return $data_cache_content; } } $where = array(); if (!empty($tag['ids'])) { $where['story_id'] = array('in',$tag['ids']); } if (!empty($tag['cid'])) { $cids = explode(',',trim($tag['cid'])); if (count($cids) > 1) { $where['story_cid'] = array('in',getlistarr_tag($cids)); }else{ $where['story_cid'] = getlistsqlin($tag['cid']); } } if (!empty($tag['vcid'])) { $cids = explode(',',trim($tag['vcid'])); if (count($cids) > 1) { $where['vod_cid'] = array('in',getlistarr_tag($cids)); }else{ $where['vod_cid'] = getlistsqlin($tag['vcid']); } } if (!empty($tag['vid'])) { $where['story_vid'] = array('in',$tag['vid']); } if (!empty($tag['name'])) { $where['vod_name'] = array('like','%'.$tag['name'].'%'); } if (!empty($tag['day'])) { $where['story_addtime'] = array('gt',getxtime($tag['day'])); } if(!empty($tag['tj'])){ $tjinfo=explode('|',trim($tag['tj'])); if($tjinfo[3]){ $where[$tjinfo[3]] = array($tjinfo[1],$tjinfo[2]); }else{ $where[$tjinfo[0]] = array($tjinfo[1],$tjinfo[2]); } } if (!empty($tag['stars'])) { $where['story_stars'] = array('in',$tag['stars']); } if(!empty($tag['lz']) == 1){ $where['story_cont'] = array('neq','0'); }elseif(!empty($tag['lz']) == 2){ $where['story_cont'] = 0; } if (!empty($tag['hits'])) { $hits = explode(',',$tag['hits']); if (count($hits) > 1) { $where['story_hits'] = array('between',$hits[0].','.$hits[1]); }else{ $where['story_hits'] = array('gt',$hits[0]); } } if(!empty($tag['prty'])){ $week=explode(',',$tag['prty']); if(count($week)>1){ $where['prty_cid']=array('in',$tag['prty']); }else{ $where['prty_cid'] = array('eq',$tag['prty']); } $where['prty_sid'] = 4; $rs = db('prty')->alias('p')->join('story s','s.story_id = p.prty_id','RIGHT')->join('vod v','v.vod_id = s.story_vid','LEFT'); }else{ $rs = db('story')->alias('s')->join('vod v','v.vod_id = s.story_vid','LEFT'); } $where['story_status'] = array('eq',1); if(!empty($params['page'])){ $count=model('story')->where($where)->count('story_id'); $list=$rs->field($tag['field'])->where($where)->order(trim($params['order']))->paginate($params['limit'],$count,['page'=>config('currentpage')]); $data =$list->all(); if(!empty($data[0])){ $data[0]['page']['pagecount'] = $list->total(); $data[0]['page']['totalpage'] = $list->lastPage(); $data[0]['page']['currentpage'] =$list->currentPage(); $data[0]['page']['pageprevurl']= getpageprev(config('model'),config('params'),$data[0]['page']['currentpage'],$data[0]['page']['totalpage'],config('home_pagenum')); $data[0]['page']['pagenexturl']= getpagenext(config('model'),config('params'),$data[0]['page']['currentpage'],$data[0]['page']['totalpage'],config('home_pagenum')); $data[0]['page']['pageurl']= getpage(config('model'),config('params'),$data[0]['page']['currentpage'],$data[0]['page']['pagecount'],$params['limit'],config('home_pagenum')); } }else{ $data=$rs->field($tag['field'])->where($where)->limit($params['limit'])->order(trim($params['order']))->select(); } foreach($data as $key=>$val){ $data[$key]['list_id'] = $val['story_cid']; $data[$key]['list_name'] = getlistname($val['story_cid'],'list_name'); $data[$key]['list_url'] = getlistname($val['story_cid'],'list_url'); $data[$key]['story_readurl'] = zanpian_data_url('home/story/read',array('id'=>$val['story_id'],'pinyin'=>$val['vod_letters'],'cid'=>$val['story_cid'],'dir'=>getlistname($val['story_cid'],'list_dir'))); $data[$key]['story_endurl'] = str_replace('zanpianpage',$val['story_page'],zanpian_data_url('home/story/read',array('id'=>$val['story_id'],'pinyin'=>$val['vod_letters'],'cid'=>$val['story_cid'],'dir'=>getlistname($val['story_cid'],'list_dir'),'p'=>$val['story_page']))); $data[$key]['vod_readurl'] = zanpian_data_url('home/vod/read',array('id'=>$val['vod_id'],'pinyin'=>$val['vod_letters'],'cid'=>$val['vod_cid'],'dir'=>getlistname($val['vod_cid'],'list_dir'),'jumpurl'=>$val['vod_jumpurl'])); $data[$key]['vod_playurl'] = zanpian_play_url(array('id'=>$val['vod_id'],'pinyin'=>$val['vod_letters'],'cid'=>$val['vod_cid'],'dir'=>getlistname($val['vod_cid'],'list_dir'),'sid'=>0,'pid'=>1)); $data[$key]['vod_picurl'] = zanpian_img_url($val['vod_pic']); $data[$key]['vod_bigpicurl'] = zanpian_img_url($val['vod_bigpic']); $data[$key]['vod_picurl_small'] = zanpian_img_smallurl($val['vod_pic']); } if(!empty($params['cache_name']) && !empty($params['cache_time'])){ Cache::tag('foreach_story')->set($params['cache_name'],$data,intval($params['cache_time'])); } return $data; } function zanpian_mysql_vod_story($vid="",$letters=""){ $where = array(); $where['story_vid'] = $vid; $where['story_status'] = array('eq',1); $array = db('story')->where($where)->find(); if(!empty($array)){ $arrays['story_readurl']=zanpian_data_url('home/story/read',array('id'=>$array['story_id'],'pinyin'=>$letters,'cid'=>$array['story_cid'],'dir'=>getlistname($array['story_cid'],'list_dir'))); $listarray=explode('||',$array['story_content']); foreach($listarray as $key=>$jiinfo){ $jiinfoarray=explode('@@',$jiinfo); $arrays['story_list'][$key+1]['story_name']=$jiinfoarray[0]; $arrays['story_list'][$key+1]['story_title']=$jiinfoarray[1]; $arrays['story_list'][$key+1]['story_info']=$jiinfoarray[2]; if($key==0){ $arrays['story_list'][$key+1]['story_url']=zanpian_data_url('home/story/read',array('id'=>$array['story_id'],'pinyin'=>$letters,'cid'=>$array['story_cid'],'dir'=>getlistname($array['story_cid'],'list_dir'))); }else{ $arrays['story_list'][$key+1]['story_url']=str_replace('zanpianpage',$key+1,zanpian_data_url('home/story/read',array('id'=>$array['story_id'],'pinyin'=>$letters,'cid'=>$array['story_cid'],'dir'=>getlistname($array['story_cid'],'list_dir'),'p'=>$key+1))); } } return $arrays; } else{ return false; } } function zanpian_mysql_actor($tag){ $tag = param_lable($tag); $tag['field']= !empty($tag['field']) ? $tag['field'] : 'actor_id,actor_cid,actor_vid,actor_addtime,actor_hits,actor_hits_day,actor_hits_week,actor_hits_month,vod_id,vod_cid,vod_letters,vod_name,vod_mcid,vod_content,vod_pic,vod_director,vod_actor,vod_year,vod_gold,vod_hits,vod_addtime,vod_jumpurl'; $params=mysql_param($tag); if(!empty($params['cache_name']) && !empty($params['cache_time'])){ $data_cache_content = Cache::get($params['cache_name']); if($data_cache_content){ return $data_cache_content; } } $where = array(); $where['actor_status'] = array('eq',1); if (!empty($tag['ids'])) { $where['actor_id'] = array('in',$tag['ids']); } if (!empty($tag['cid'])) { $cids = explode(',',trim($tag['cid'])); if (count($cids) > 1) { $where['actor_cid'] = array('in',getlistarr_tag($cids)); }else{ $where['actor_cid'] = getlistsqlin($tag['cid']); } } if (!empty($tag['vcid'])) { $cids = explode(',',trim($tag['vcid'])); if (count($cids) > 1) { $where['vod_cid'] = array('in',getlistarr_tag($cids)); }else{ $where['vod_cid'] = getlistsqlin($tag['vcid']); } } if (!empty($tag['vid'])) { $where['actor_vid'] = array('in',$tag['vid']); } if (!empty($tag['name'])) { $where['vod_name'] = array('like','%'.$tag['name'].'%'); } if (!empty($tag['day'])) { $where['actor_addtime'] = array('gt',getxtime($tag['day'])); } if(!empty($tag['tj'])){ $tjinfo=explode('|',trim($tag['tj'])); if($tjinfo[3]){ $where[$tjinfo[3]] = array($tjinfo[1],$tjinfo[2]); }else{ $where[$tjinfo[0]] = array($tjinfo[1],$tjinfo[2]); } } if (!empty($tag['stars'])) { $where['actor_stars'] = array('in',$tag['stars']); } if (!empty($tag['hits'])) { $hits = explode(',',$tag['hits']); if (count($hits) > 1) { $where['actor_hits'] = array('between',$hits[0].','.$hits[1]); }else{ $where['actor_hits'] = array('gt',$hits[0]); } } if(!empty($tag['prty'])){ $week=explode(',',$tag['prty']); if(count($week)>1){ $where['prty_cid']=array('in',$tag['prty']); }else{ $where['prty_cid'] = array('eq',$tag['prty']); } $where['prty_sid'] = 6; $rs = db('prty')->alias('p')->join('actor a','a.actor_id = p.prty_id','LEFT')->join('vod v','v.vod_id = a.actor_vid','LEFT'); }else{ $rs = db('actor')->alias('a')->join('vod v','v.vod_id = a.actor_vid','LEFT'); } if(!empty($params['page'])){ $list=$rs->field($tag['field'])->where($where)->order(trim($params['order']))->paginate($params['limit'],false,['page'=>config('currentpage')]); $data =$list->all(); if(!empty($data[0])){ $data[0]['page']['pagecount'] = $list->total(); $data[0]['page']['totalpage'] = $list->lastPage(); $data[0]['page']['currentpage'] =$list->currentPage(); $data[0]['page']['pageprevurl']= getpageprev(config('model'),config('params'),$data[0]['page']['currentpage'],$data[0]['page']['totalpage'],config('home_pagenum')); $data[0]['page']['pagenexturl']= getpagenext(config('model'),config('params'),$data[0]['page']['currentpage'],$data[0]['page']['totalpage'],config('home_pagenum')); $data[0]['page']['pageurl']= getpage(config('model'),config('params'),$data[0]['page']['currentpage'],$data[0]['page']['pagecount'],$params['limit'],config('home_pagenum')); } }else{ $data=$rs->field($tag['field'])->where($where)->limit($params['limit'])->order(trim($params['order']))->select(); } foreach($data as $key=>$val){ $data[$key]['list_id'] = $val['actor_cid']; $data[$key]['list_name'] = getlistname($val['actor_cid'],'list_name'); $data[$key]['list_url'] = getlistname($val['actor_cid'],'list_url'); $data[$key]['actor_readurl'] = zanpian_data_url('home/actor/read',array('id'=>$val['actor_id'],'pinyin'=>$val['vod_letters'],'cid'=>$val['actor_cid'],'dir'=>getlistname($val['actor_cid'],'list_dir'))); $data[$key]['vod_readurl'] = zanpian_data_url('home/vod/read',array('id'=>$val['vod_id'],'pinyin'=>$val['vod_letters'],'cid'=>$val['vod_cid'],'dir'=>getlistname($val['vod_cid'],'list_dir'),'jumpurl'=>$val['vod_jumpurl'])); $data[$key]['vod_playurl'] = zanpian_play_url(array('id'=>$val['vod_id'],'pinyin'=>$val['vod_letters'],'cid'=>$val['vod_cid'],'dir'=>getlistname($val['vod_cid'],'list_dir'),'sid'=>0,'pid'=>1)); $data[$key]['vod_picurl'] = zanpian_img_url($val['vod_pic']); $data[$key]['vod_bigpicurl'] = zanpian_img_url($val['vod_bigpic']); $data[$key]['vod_picurl_small'] = zanpian_img_smallurl($val['vod_pic']); } if(!empty($params['cache_name']) && !empty($params['cache_time'])){ Cache::tag('foreach_actor')->set($params['cache_name'],$data,intval($params['cache_time'])); } return $data; } function zanpian_mysql_role($tag){ $tag = param_lable($tag); $tag['field']= !empty($tag['field']) ? $tag['field'] : 'a.*,r.*,s.*,vod_id,vod_cid,vod_mcid,vod_name,vod_aliases,vod_title,vod_keywords,vod_actor,vod_director,vod_content,vod_pic,vod_bigpic,vod_diantai,vod_tvcont,vod_tvexp,vod_area,vod_language,vod_year,vod_continu,vod_total,vod_isend,vod_addtime,vod_hits,vod_hits_day,vod_hits_week,vod_hits_month,vod_stars,vod_jumpurl,vod_letter,vod_gold,vod_golder,vod_isfilm,vod_filmtime,vod_length,vod_letters'; $tag['order']= !empty($tag['order']) ? $tag['order'] : 'role_oid asc,role_addtime desc'; $params=mysql_param($tag); if(!empty($params['cache_name']) && !empty($params['cache_time'])){ $data_cache_content = Cache::get($params['cache_name']); if($data_cache_content){ return $data_cache_content; } } $where = array(); $where['role_status'] = array('eq',1); if (!empty($tag['ids'])) { $where['role_id'] = array('in',$tag['ids']); } if (!empty($tag['cid'])) { $cids = explode(',',trim($tag['cid'])); if (count($cids) > 1) { $where['role_cid'] = array('in',getlistarr_tag($cids)); }else{ $where['role_cid'] = getlistsqlin($tag['cid']); } } if (!empty($tag['vcid'])) { $cids = explode(',',trim($tag['vcid'])); if (count($cids) > 1) { $where['vod_cid'] = array('in',getlistarr_tag($cids)); }else{ $where['vod_cid'] = getlistsqlin($tag['vcid']); } } if (!empty($tag['vid'])) { $where['role_vid'] = $tag['vid']; } if (!empty($tag['name'])) { $where['role_name'] = array('eq',$tag['name']); } if (!empty($tag['starname'])) { $where['role_star'] = array('eq',$tag['starname']); } if(!empty($tag['tj'])){ $tjinfo=explode('|',trim($tag['tj'])); if($tjinfo[3]){ $where[$tjinfo[3]] = array($tjinfo[1],$tjinfo[2]); }else{ $where[$tjinfo[0]] = array($tjinfo[1],$tjinfo[2]); } } if (!empty($tag['stars'])) { $where['role_stars'] = array('in',$tag['stars']); } if (!empty($tag['hits'])) { $hits = explode(',',$tag['hits']); if (count($hits) > 1) { $where['role_hits'] = array('between',$hits[0].','.$hits[1]); }else{ $where['role_hits'] = array('gt',$hits[0]); } } $rs = db('role')->alias('r')->join('vod v','v.vod_id = r.role_vid','LEFT')->join('actor a','a.actor_vid = r.role_vid','LEFT')->join('star s','s.star_name = r.role_star','LEFT'); if(!empty($params['page'])){ $count=model('role')->where($where)->count('role_id'); $list=$rs->field($tag['field'])->where($where)->order(trim($params['order']))->paginate($params['limit'],$count,['page'=>config('currentpage')]); $data =$list->all(); if(!empty($data[0])){ $data[0]['page']['pagecount'] = $list->total(); $data[0]['page']['totalpage'] = $list->lastPage(); $data[0]['page']['currentpage'] =$list->currentPage(); $data[0]['page']['pageprevurl']= getpageprev(config('model'),config('params'),$data[0]['page']['currentpage'],$data[0]['page']['totalpage'],config('home_pagenum')); $data[0]['page']['pagenexturl']= getpagenext(config('model'),config('params'),$data[0]['page']['currentpage'],$data[0]['page']['totalpage'],config('home_pagenum')); $data[0]['page']['pageurl']= getpage(config('model'),config('params'),$data[0]['page']['currentpage'],$data[0]['page']['pagecount'],$params['limit'],config('home_pagenum')); } }else{ $data=$rs->field($tag['field'])->where($where)->limit($params['limit'])->order(trim($params['order']))->select(); } foreach($data as $key=>$val){ $data[$key]['list_id'] = $val['role_cid']; $data[$key]['list_name'] = getlistname($val['role_cid'],'list_name'); $data[$key]['list_url'] = getlistname($val['role_cid'],'list_url'); $data[$key]['role_readurl'] = zanpian_data_url('home/role/read',array('id'=>$val['role_id'],'pinyin'=>$val['vod_letters'],'cid'=>$val['role_cid'],'dir'=>getlistname($val['role_cid'],'list_dir'))); $data[$key]['role_picurl'] = zanpian_img_url($val['role_pic']); $data[$key]['actor_readurl'] = zanpian_data_url('home/actor/read',array('id'=>$val['actor_id'],'pinyin'=>$val['vod_letters'],'cid'=>$val['actor_cid'],'dir'=>getlistname($val['actor_cid'],'list_dir'))); $data[$key]['vod_readurl'] = zanpian_data_url('home/vod/read',array('id'=>$val['vod_id'],'pinyin'=>$val['vod_letters'],'cid'=>$val['vod_cid'],'dir'=>getlistname($val['vod_cid'],'list_dir'),'jumpurl'=>$val['vod_jumpurl'])); $data[$key]['vod_picurl'] = zanpian_img_url($val['vod_pic']); $data[$key]['vod_bigpicurl'] = zanpian_img_url($val['vod_bigpic']); $data[$key]['vod_picurl_small'] = zanpian_img_smallurl($val['vod_pic']); if(!empty($val['star_id'])){ $data[$key]['star_readurl'] = zanpian_data_url('home/star/read',array('id'=>$val['star_id'],'pinyin'=>$val['star_letters'],'cid'=>$val['star_cid'],'dir'=>getlistname($val['star_cid'],'list_dir'),'jumpurl'=>$val['star_jumpurl'])); $data[$key]['star_picurl'] = zanpian_img_url($val['star_pic']); }else{ $data[$key]['star_picurl'] = zanpian_img_url(false); $data[$key]['star_readurl']=zanpian_data_url('home/search/index',array('wd'=>urlencode(trim($val['role_star'])))); } } if(!empty($params['cache_name']) && !empty($params['cache_time'])){ Cache::tag('foreach_role')->set($params['cache_name'],$data,intval($params['cache_time'])); } return $data; } function zanpian_mysql_tv($tag){ $tag = param_lable($tag); $tag['field']= !empty($tag['field']) ? $tag['field'] : '*'; $params=mysql_param($tag); if(!empty($params['cache_name']) && !empty($params['cache_time'])){ $data_cache_content = Cache::get($params['cache_name']); if($data_cache_content){ return $data_cache_content; } } $where = array(); $where['tv_status'] = array('eq',1); if (!empty($tag['ids'])) { $where['tv_id'] = array('in',$tag['ids']); } if (!empty($tag['cid'])) { $cids = explode(',',trim($tag['cid'])); if (count($cids) > 1) { $where['tv_cid'] = array('in',getlistarr_tag($cids)); }else{ $where['tv_cid'] = getlistsqlin($tag['cid']); } } if (!empty($tag['day'])) { $where['tv_addtime'] = array('gt',getxtime($tag['day'])); } if (!empty($tag['stars'])) { $where['tv_stars'] = array('in',$tag['stars']); } if (!empty($tag['letter'])) { $letter = explode(',',$tag['letter']); if (count($letter)>1) { $where['tv_letter'] = array('in',$tag['letter']); }else{ $where['tv_letter'] = array('eq',$letter[0]); } } if (!empty($tag['hits'])) { $hits = explode(',',$tag['hits']); if (count($hits) > 1) { $where['tv_hits'] = array('between',$hits[0].','.$hits[1]); }else{ $where['tv_hits'] = array('gt',$hits[0]); } } if(!empty($tag['no'])){ $where['tv_id'] = array('neq',$tag['no']); } if (!empty($tag['name'])) { $where['tv_name'] = array('like','%'.$tag['name'].'%'); } if (!empty($tag['wd'])) { $where['tv_name|tv_content|tv_data'] = array('like','%'.$tag['wd'].'%'); } if (!empty($tag['gold'])) { $gold = explode(',',$tag['gold']); if (count($gold) > 1) { $where['tv_gold'] = array('between',$gold[0].','.$gold[1]); }else{ $where['tv_gold'] = array('gt',$gold[0]); } } if (!empty($tag['golder'])) { $golder = explode(',',$tag['golder']); if (count($golder) > 1) { $where['tv_golder'] = array('between',$golder[0].','.$golder[1]); }else{ $where['tv_golder'] = array('gt',$golder[0]); } } if(!empty($tag['prty'])){ $week=explode(',',$tag['prty']); if(count($week)>1){ $where['prty_cid']=array('in',$tag['prty']); }else{ $where['prty_cid'] = array('eq',$tag['prty']); } $where['prty_sid'] = 7; $rs = db('prty')->alias('p')->join('tv t','t.tv_id = p.prty_id','LEFT'); }else{ $rs=db('tv'); } if(!empty($params['page'])){ $list=$rs->field($tag['field'])->where($where)->order(trim($params['order']))->paginate($params['limit'],false,['page'=>config('currentpage')]); $data =$list->all(); if(!empty($data[0])){ $data[0]['page']['pagecount'] = $list->total(); $data[0]['page']['totalpage'] = $list->lastPage(); $data[0]['page']['currentpage'] =$list->currentPage(); $data[0]['page']['pageprevurl']= getpageprev(config('model'),config('params'),$data[0]['page']['currentpage'],$data[0]['page']['totalpage'],config('home_pagenum')); $data[0]['page']['pagenexturl']= getpagenext(config('model'),config('params'),$data[0]['page']['currentpage'],$data[0]['page']['totalpage'],config('home_pagenum')); $data[0]['page']['pageurl']= getpage(config('model'),config('params'),$data[0]['page']['currentpage'],$data[0]['page']['pagecount'],$params['limit'],config('home_pagenum')); } }else{ $data=$rs->field($tag['field'])->where($where)->limit($params['limit'])->order(trim($params['order']))->select(); } $week=str_replace('0','7',date("w")); foreach($data as $key=>$val){ $data[$key]['list_id'] = $val['tv_cid']; $data[$key]['list_name'] = getlistname($val['tv_cid'],'list_name'); $data[$key]['list_url'] = getlistname($val['tv_cid'],'list_url'); $data[$key]['tv_readurl'] = zanpian_data_url('home/tv/read',array('id'=>$val['tv_id'],'pinyin'=>$val['tv_letters'],'cid'=>$val['tv_cid'],'dir'=>getlistname($val['tv_cid'],'list_dir'))); $data[$key]['tv_picurl'] = zanpian_img_url($val['tv_pic']); $data[$key]['tv_icourl'] = zanpian_img_url($val['tv_pic']); if(!empty($tag['data'])){ $data[$key]['tv_datalist']=model('tv')->tv_week($val['tv_data'],$week,$tag['zhibo']); unset($data[$key]['tv_data']); } } if(!empty($params['cache_name']) && !empty($params['cache_time'])){ Cache::tag('foreach_tv')->set($params['cache_name'],$data,intval($params['cache_time'])); } return $data; } function zanpian_mysql_vod_tv($tag){ $tag = param_lable($tag); return model('tv')->vod_tv($tag); } function zanpian_mysql_slide($tag){ $tag = param_lable($tag); $tag['field']= !empty($tag['field']) ? $tag['field'] : 's.*,vod_id,vod_letters,vod_cid,vod_title,vod_continu,vod_content,vod_pic,vod_aliases,vod_mcid,vod_actor,vod_director,vod_bigpic,vod_diantai,vod_tvcont,vod_tvexp,vod_area,vod_language,vod_year,vod_total,vod_addtime,vod_filmtime,vod_golder,vod_jumpurl'; $params=mysql_param($tag); if(!empty($params['cache_name']) && !empty($params['cache_time'])){ $data_cache_content = Cache::get($params['cache_name']); if($data_cache_content){ return $data_cache_content; } } $where = array(); $where['slide_status'] = array('eq',1); if (!empty($tag['cid'])) { $where['slide_cid'] = array('in',$tag['cid']); } if (!empty($tag['nocid'])) { $where['slide_cid'] = array('neq',$tag['nocid']); } $rs = db('slide')->alias('s')->join('vod v','v.vod_id = s.slide_vid','LEFT'); $data=$rs->field($tag['field'])->where($where)->limit($params['limit'])->order(trim($params['order']))->select(); foreach($data as $key=>$val){ $data[$key]['slide_picurl'] = zanpian_img_url($val['slide_pic']); $data[$key]['slide_logourl'] = zanpian_img_url($val['slide_logo']); if($data[$key]['vod_id']){ $data[$key]['vod_readurl'] = zanpian_data_url('home/vod/read',array('id'=>$val['vod_id'],'pinyin'=>$val['vod_letters'],'cid'=>$val['vod_cid'],'dir'=>getlistname($val['vod_cid'],'list_dir'),'jumpurl'=>$val['vod_jumpurl'])); $data[$key]['vod_picurl'] = zanpian_img_url($val['vod_pic']); } } if(!empty($params['cache_name']) && !empty($params['cache_time'])){ Cache::tag('foreach_slide')->set($params['cache_name'],$data,intval($params['cache_time'])); } return $data; } function zanpian_mysql_link($tag){ $tag = param_lable($tag); $tag['field']= !empty($tag['field']) ? $tag['field'] : '*'; $params=mysql_param($tag); if(!empty($params['cache_name']) && !empty($params['cache_time'])){ $data_cache_content = Cache::get($params['cache_name']); if($data_cache_content){ return $data_cache_content; } } $where = array(); $where['link_status'] = array('eq',1); if (!empty($tag['type'])) { $where['link_type'] = array('in',$tag['type']); } $rs=db('link')->field($tag['field']); $data=$rs->where($where)->limit($params['limit'])->order(trim($params['order']))->select(); foreach($data as $key=>$val){ $data[$key]['link_logo'] = zanpian_img_url($data[$key]['link_logo']); } if(!empty($params['cache_name']) && !empty($params['cache_time'])){ Cache::tag('foreach_link')->set($params['cache_name'],$data,intval($params['cache_time'])); } return $data; } function zanpian_mysql_special($tag){ $tag = param_lable($tag); $tag['field']= !empty($tag['field']) ? $tag['field'] : '*'; $params=mysql_param($tag); if(!empty($params['cache_name']) && !empty($params['cache_time'])){ $data_cache_content = Cache::get($params['cache_name']); if($data_cache_content){ return $data_cache_content; } } $where = array(); $where['special_status'] = array('eq',1); if (!empty($tag['ids'])) { $where['special_id'] = array('in',$tag['ids']); } if (!empty($tag['cid'])) { $cids = explode(',',trim($tag['cid'])); if (count($cids) > 1) { $where['special_cid'] = array('in',getlistarr_tag($cids)); }else{ $where['special_cid'] = getlistsqlin($tag['cid']); } } if (!empty($tag['day'])) { $where['special_addtime'] = array('gt',getxtime($tag['day'])); } if (!empty($tag['stars'])) { $where['special_stars'] = array('in',$tag['stars']); } if (!empty($tag['hits'])) { $hits = explode(',',$tag['hits']); if (count($hits) > 1) { $where['special_hits'] = array('between',$hits[0].','.$hits[1]); }else{ $where['special_hits'] = array('gt',$hits[0]); } } if (!empty($tag['name'])) { $where['special_name'] = array('like','%'.$tag['wd'].'%'); } if (!empty($tag['wd'])) { $where['special_name|special_content'] = array('like','%'.$tag['wd'].'%'); } if (!empty($tag['gold'])) { $gold = explode(',',$tag['gold']); if (count($gold) > 1) { $where['special_gold'] = array('between',$gold[0].','.$gold[1]); }else{ $where['special_gold'] = array('gt',$gold[0]); } } if (!empty($tag['golder'])) { $golder = explode(',',$tag['golder']); if (count($golder) > 1) { $where['special_golder'] = array('between',$golder[0].','.$golder[1]); }else{ $where['special_golder'] = array('gt',$golder[0]); } } if(!empty($tag['prty'])){ $week=explode(',',$tag['prty']); if(count($week)>1){ $where['prty_cid']=array('in',$tag['prty']); }else{ $where['prty_cid'] = array('eq',$tag['prty']); } $where['prty_sid'] = 10; $rs = db('prty')->alias('p')->join('special s','s.special_id = p.prty_id','LEFT'); }else{ $rs=db('special'); } if(!empty($params['page'])){ $list=$rs->field($tag['field'])->where($where)->order(trim($params['order']))->paginate($params['limit'],false,['page'=>config('currentpage')]); $data =$list->all(); if(!empty($data[0])){ $data[0]['page']['pagecount'] = $list->total(); $data[0]['page']['totalpage'] = $list->lastPage(); $data[0]['page']['currentpage'] =$list->currentPage(); $data[0]['page']['pageprevurl']= getpageprev(config('model'),config('params'),$data[0]['page']['currentpage'],$data[0]['page']['totalpage'],config('home_pagenum')); $data[0]['page']['pagenexturl']= getpagenext(config('model'),config('params'),$data[0]['page']['currentpage'],$data[0]['page']['totalpage'],config('home_pagenum')); $data[0]['page']['pageurl']= getpage(config('model'),config('params'),$data[0]['page']['currentpage'],$data[0]['page']['pagecount'],$params['limit'],config('home_pagenum')); } }else{ $data=$rs->field($tag['field'])->where($where)->limit($params['limit'])->order(trim($params['order']))->select(); } foreach($data as $key=>$val){ $data[$key]['list_id'] = $val['special_cid']; $data[$key]['list_name'] = getlistname($val['special_cid'],'list_name'); $data[$key]['list_url'] = getlistname($val['special_cid'],'list_url'); $data[$key]['special_readurl'] = zanpian_data_url('home/special/read',array('id'=>$val['special_id'],'pinyin'=>$val['special_letters'],'cid'=>$val['special_cid'],'dir'=>getlistname($val['special_cid'],'list_dir'))); $data[$key]['special_logo'] = zanpian_img_url($val['special_logo']); $data[$key]['special_banner'] = zanpian_img_url($val['special_banner']); } if(!empty($params['cache_name']) && !empty($params['cache_time'])){ Cache::tag('foreach_special')->set($params['cache_name'],$data,intval($params['cache_time'])); } return $data; } function zanpian_mysql_visitors($tag){ $tag = param_lable($tag); $tag['field']= !empty($tag['field']) ? $tag['field'] : '*'; $params=mysql_param($tag); $where = array(); if($tag['userid']) { $where['visitors_userid'] = array('eq',$tag['userid']); } if($tag['uid']) { $where['visitors_uid'] = array('eq',$tag['uid']); } return model('Visitors')->GetVisitors($params,$where); } function zanpian_mysql_gb($tag){ $tag = param_lable($tag); $tag['field']= !empty($tag['field']) ? $tag['field'] : '*'; $params=mysql_param($tag); $where = array(); $where['gb_status'] = array('eq',1); if (!empty($tag['uid'])) { $where['gb_uid'] = array('in',$tag['uid']); } if (!empty($tag['cid'])) { $where['gb_cid'] = array('in',$tag['cid']); } if (!empty($tag['vid'])) { $where['gb_vid'] = array('in',$tag['vid']); } $rs =db('gb')->alias('g')->join('user u','u.userid = g.gb_uid','LEFT'); if(!empty($params['page'])){ $list=$rs->field($tag['field'])->where($where)->order(trim($params['order']))->paginate($params['limit'],false,['page'=>config('currentpage')]); $data =$list->all(); if(!empty($data[0])){ $data[0]['page']['pagecount'] = $list->total(); $data[0]['page']['totalpage'] = $list->lastPage(); $data[0]['page']['currentpage'] =$list->currentPage(); $data[0]['page']['pageprevurl']= getpageprev(config('model'),config('params'),$data[0]['page']['currentpage'],$data[0]['page']['totalpage'],config('home_pagenum')); $data[0]['page']['pagenexturl']= getpagenext(config('model'),config('params'),$data[0]['page']['currentpage'],$data[0]['page']['totalpage'],config('home_pagenum')); $data[0]['page']['pageurl']= getpage(config('model'),config('params'),$data[0]['page']['currentpage'],$data[0]['page']['pagecount'],$params['limit'],config('home_pagenum')); } }else{ $data=$rs->field($tag['field'])->where($where)->limit($params['limit'])->order(trim($params['order']))->select(); } foreach($data as $key=>$val){ if($val['userid']){ $userapi=db('user_api')->where('uid',$val['userid'])->find(); $data[$key]['user_homeurl'] = zanpian_user_url('user/home/index',array('id'=>$val['userid'])); $data[$key]['user_imageurl'] = ps_getavatar($val['userid'],$userapi['avatar']); } } return $data; } function play_url_end($vod_url,$vod_play){ $player = F('_data/player'); $arr_server = explode('$$$',trim($vod_url)); $arr_player= explode('$$$',trim($vod_play)); foreach ($arr_player as $key=>$value){ if(empty($player[$value]) || $player[$value]['play_display']==0 || $value=="down"){ unset($arr_player[$key]); unset($arr_server[$key]); }else{ $arr_player[$key] = $arr_server[$key]; } } if($arr_player){ foreach($arr_player as $key=>$value){ $array[$key] = array(count(explode(chr(13),str_replace(array("\r\n", "\n", "\r"),chr(13),$value))),$key); } $max_key = max($array); $array = explode(chr(13),str_replace(array("\r\n", "\n", "\r"),chr(13),$arr_player[$max_key[1]])); $arr_url = explode('$',end($array)); if($arr_url[1]){ return array($max_key[1],$max_key[0],$arr_url[0],$arr_url[1]); }else{ return array($max_key[1],$max_key[0],'第'.$max_key[0].'集',$arr_url[0]); } }else{ return false; } } function get_star_url($actor,$label='span',$k='',$keyword=''){ if(is_array($actor)){ $star_arr =$actor; }else{ $star_arr = explode(',',trim(str_replace(array(',','/','，','|','、',' '),',',$actor))); } $list=db('star')->field('star_id,star_cid,star_name,star_letters,star_jumpurl,star_hits')->where('star_name','in',$star_arr)->select(); if($list){ foreach($list as $key=>$value){ $stararray[]=$value['star_name']; } $nostar=array_diff($star_arr,$stararray); $hestar=array_merge($stararray,$nostar); }else{ $hestar=$star_arr; } if(!empty($hestar)){ foreach($hestar as $key=>$value){ if(!empty($k) && $key==$k){break;} if($keyword){ $value = get_hilight_ex($value,$keyword,'font','red'); } if(!empty($list[$key]['star_id'])){ if($label=='no'){ $urlarr[$key]='<a href="'.zanpian_data_url('home/star/read',array('id'=>$list[$key]['star_id'],'pinyin'=>$list[$key]['star_letters'],'cid'=>$list[$key]['star_cid'],'dir'=>getlistname($list[$key]['star_cid'],'list_dir'),'jumpurl'=>$list[$key]['star_jumpurl'])).'" target="_blank">'.trim($value).'</a>'; }elseif($label=='a'){ $urlarr[$key]=zanpian_data_url('home/star/read',array('id'=>$list[$key]['star_id'],'pinyin'=>$list[$key]['star_letters'],'cid'=>$list[$key]['star_cid'],'dir'=>getlistname($list[$key]['star_cid'],'list_dir'),'jumpurl'=>$list[$key]['star_jumpurl'])); }elseif($label=='n'){ $urlarr[$key]=$value; }else{ $urlarr[$key]='<'.$label.'><a href="'.zanpian_data_url('home/star/read',array('id'=>$list[$key]['star_id'],'pinyin'=>$list[$key]['star_letters'],'cid'=>$list[$key]['star_cid'],'dir'=>getlistname($list[$key]['star_cid'],'list_dir'),'jumpurl'=>$list[$key]['star_jumpurl'])).'" target="_blank">'.trim($value).'</a></'.$label.'>'; } }else{ if($label=='no'){ $urlarr[$key]='<a rel="nofollow" href="'.zanpian_url('home/search/index',array('wd'=>urlencode(trim($value))),true,false).'" target="_blank">'.trim($value).'</a>'; }elseif($label=='a'){ $urlarr[$key]=zanpian_url('home/search/index',array('wd'=>urlencode(trim($value))),true,false); }else{ $urlarr[$key]='<'.$label.'><a rel="nofollow" href="'.zanpian_url('home/search/index',array('wd'=>urlencode(trim($value))),true,false).'" target="_blank">'.trim($value).'</a></'.$label.'>'; } } } return implode('',$urlarr); } } function get_vod_url($name,$type,$tvname=""){ $where['vod_name'] = $name; $where['vod_status'] = array('eq',1); $list = db('vod')->field('vod_id,vod_cid,vod_letters,vod_name,vod_jumpurl')->where($where)->limit(1)->order('vod_id desc')->cache(600)->find(); if(empty($list) && !empty($type)){ unset($where); $where['vod_name'] = array('like',$name.'%'); $where['vod_status'] = array('eq',1); $list = db('vod')->field('vod_id,vod_cid,vod_letters,vod_name,vod_jumpurl')->where($where)->limit(1)->order('vod_id desc')->cache(600)->find(); } if(!empty($list)){ if(!empty($tvname)){ model('Tv')->tv_update($list['vod_id'],$tvname,1); } return zanpian_data_url('home/vod/read',array('id'=>$list['vod_id'],'pinyin'=>$list['vod_letters'],'cid'=>$list['vod_cid'],'dir'=>getlistname($list['vod_cid'],'list_dir'),'jumpurl'=>$list['vod_jumpurl'])); } return ""; } function get_tv_url($name,$label='span',$k=""){ if(is_array($name)){ $names=$name; }else{ $names = explode(',',trim($name)); } $where['tv_name'] = array('in',$names); $list = db('tv')->field('tv_id,tv_cid,tv_letters,tv_name')->where($where)->select(); $html = ''; if(!empty($list)){ foreach($list as $key=>$value){ $url= zanpian_data_url('home/tv/read',array('id'=>$list[$key]['tv_id'],'pinyin'=>$list[$key]['tv_letters'],'cid'=>$list[$key]['tv_cid'],'dir'=>getlistname($list[$key]['tv_cid'],'list_dir'))); if($label=="no"){ $html .= "<a href='".$url."' target='_blank'>{$list[$key]['tv_name']}</a>"; } elseif($label=="url"){ $html .= $url; } else{ $html .= "<".$label."><a href='".$url."' target='_blank'>{$list[$key]['tv_name']}</a></".$label.">"; } } } return $html; } function tag_url($str,$sid,$k=""){ if(is_array($str)){ $array=$str; }else{ $str = explode(',',trim($str)); } $mode= list_search(F('_data/modellist'),'id='.$sid); $html = ''; foreach($str as $key=>$v){ if(!empty($k) && $key==$k){break;} $url = zanpian_list_url('home/tag/show', array('id'=>$sid,'dir'=>$mode[0]['name'],'tag'=>urlencode($v))); $html .= "<a href='".$url."' target='_blank'>{$v}</a> "; } return $html; } function zanpian_mcid_replace($content,$array_tag,$cid,$sid=1){ $mcatarray=getlistmcat($cid); if(is_array($array_tag)){ $array_tag=$array_tag; }else{ $array_tag = explode(',',trim($array_tag)); } if($array_tag){ foreach($array_tag as $key=>$value){ $arr = list_search($mcatarray,'m_name='.$value); $preg='/'.str_replace('/','\/',$value).'/'; $revalue='<a href="'.zanpian_type_url('home/vod/type', array('id'=>$cid,'dir'=>getlistname($cid,'list_dir'),'mcid'=>$arr[0]['m_cid'],'area'=>"",'year'=>"",'letter'=>"",'order'=>"")).'" target="_blank">'.$value.'</a>'; } $content = preg_replace($preg,$revalue,$content,1); } return $content; } function zanpian_tags_replace($content,$array_tag,$sid=1){ if(is_array($array_tag)){ $array_tag=$array_tag; }else{ $array_tag = explode(',',trim($array_tag)); } if($array_tag){ foreach($array_tag as $key=>$value){ $preg='/'.str_replace('/','\/',$value).'/'; $revalue=tag_url($value,$sid); } $content = preg_replace($preg,$revalue,$content,1); } return $content; } function zanpian_actor_replace($content,$actor){ if(empty($content) || empty($actor)){ return $content; } $array_actor = explode(',',$actor); if($array_actor){ foreach($array_actor as $key=>$value){ $preg='/'.str_replace('/','\/',$value).'/'; $revalue=get_star_url($value,'no'); $content = preg_replace($preg,$revalue,$content,1); } $content = preg_replace($preg,$revalue,$content,1); } return $content; } function zanpian_role_replace($content,$vid,$pinyin){ if(empty($content) || empty($vid)){ return $content; } $role=db('role')->where('role_vid',$vid)->field('role_id,role_name,role_star,role_cid')->select(); if($role){ foreach($role as $key=>$value){ $roleurl=zanpian_data_url('home/role/read',array('id'=>$value['role_id'],'pinyin'=>$pinyin,'cid'=>$value['role_cid'],'dir'=>getlistname($value['role_cid'],'list_dir'))); $role[$key]='<role><a target="_blank" href="'.$roleurl.'" title="'.$value['role_star'].'饰'.$value['role_name'].'">'.$value['role_name'].'</a></role><star>('.get_star_url($value['role_star'],'no').'饰)</star>'; $pregs[$key]='/'.str_replace('/','\/',$value['role_name']).'/'; } $content = preg_replace($pregs,$role,$content,1); } return $content; } function get_emots($content=false) { if(!$content){ return false; } $ture=preg_split("/\[.*?\]/", $content); if(count($ture)>0){ $emots=F('_data/list_emots'); $site_cssjsurl=config('site_cssjsurl'); $public=!empty($site_cssjsurl) ? $site_cssjsurl : config('site_path').PUBLIC_PATH.'tpl/'; foreach ($emots as $v) { $content = str_replace("[" . $v['emot_name'] . "]", "<img alt='" . $v['emot_name'] . "' src='" . $public . "admin/emot/" . ($v['emot_id'] - 1) . ".gif'>", $content); } } return $content; } function ps_getavatar($uid,$avatar="",$size=""){ $session=session('user_auth'); if(!is_numeric($uid)) { $uid = $session['userid']; if(empty($uid)){ return '' ; } } $size = in_array(big, array('big', 'middle', 'small')) ? big : 'big'; $uid = abs(intval($uid)); $uid = sprintf("%09d", $uid); $dir1 = substr($uid, 0, 3); $dir2 = substr($uid, 3, 2); $dir3 = substr($uid, 5, 2); $typeadd = $type == 'real' ? '_real' : ''; $url = URL_PATH.config('upload_path').'/avatar/'.$dir1.'/'.$dir2.'/'.$dir3.'/'.substr($uid, -2).$typeadd."_avatar_$size.jpg"; $info = @@getimagesize($url); $fp=@@fopen($url, "rb"); if(!$fp && !empty($avatar)){ $avatar = array('big'=>$avatar, 'middle'=>$avatar, 'small'=>$avatar); } else{ $url = rtrim(config('site_url'), '/').config('site_path').'avatar/avatar.php?uid='.$uid; $avatar = array('big'=>$url.'&&size=big', 'middle'=>$url.'&&size=middle', 'small'=>$url.'&&size=small'); } return $avatar ; } function user_islogin() { $user = session('user_auth'); if(empty($user)) { return 0; }else { return session('user_auth_sign') == data_auth_sign($user) ? $user['userid'] : 0; } } function data_auth_sign($data) { if (!is_array($data)) { $data = (array) $data; } ksort($data); $code = http_build_query($data); $sign = sha1($code); return $sign; } function get_small_id($id){ if($id){ return floor($id/1000); } } function get_small_vod_id($name){ if($name){ $id = get_vod_info($name,'vod_letters','vod_id'); return get_small_id($id); } } function get_vod_id($name){ if($name){ $id = get_vod_info($name,'vod_letters','vod_id'); return $id; } } function get_list_id($name){ if($name){ $id = getlist($name,'list_dir','list_id'); return $id; } } function get_small_list_id($name){ if($name){ $id = getlist($name,'list_dir','list_id'); return get_small_id($id); } } function get_small_story_id($name){ if($name){ $id = get_story_info($name,'story_id','story_vid'); return get_small_id($id); } } function get_story_id($name){ if($name){ $id = get_story_info($name,'story_id','story_vid'); return $id; } } function get_small_actor_id($name){ if($name){ $id = get_actor_info($name,'actor_id','actor_vid'); return get_small_id($id); } } function get_actor_id($name){ if($name){ $id = get_actor_info($name,'actor_id','actor_vid'); return $id; } } function get_small_role_id($name){ if($name){ $id = get_role_info($name,'role_id','role_vid'); return get_small_id($id); } } function get_role_id($name){ if($name){ $id = get_role_info($name,'role_id','role_vid'); return $id; } } function get_small_star_id($name){ if($name){ $id = get_star_info($name,'star_letters','star_id'); return get_small_id($id); } } function get_star_id($name){ if($name){ $id = get_star_info($name,'star_letters','star_id'); return $id; } } function get_small_tv_id($name){ if($name){ $id = get_tv_info($name,'tv_letters','tv_id'); return get_small_id($id); } } function get_tv_id($name){ if($name){ $id = get_tv_info($name,'tv_letters','tv_id'); return $id; } } function get_small_special_id($name){ if($name){ $id = get_special_info($name,'special_letters','special_id'); return get_small_id($id); } } function get_special_id($name){ if($name){ $id = get_special_info($name,'special_letters','special_id'); return $id; } } function playlist_all($array,$list_dir){ if(empty($array['vod_url'])){return false;} $array_server = explode('$$$',$array['vod_server']); $array_player = explode('$$$',$array['vod_play']); $array_urllist = explode('$$$',$array['vod_url']); $config_player = F('_data/player'); $config_server = F('_data/play_server'); foreach ($array_player as $key=>$value){ if($value=="down"){ $array_down_player[$key] = $value; $array_down_urllist[$key]=$array_urllist[$key]; } if(empty($config_player[$value]) || $config_player[$value]['play_display']==0 || $value=="down"){ unset($array_player[$key]); unset($array_urllist[$key]); } } $array_player=array_values($array_player); $array_urllist=array_values($array_urllist); $playlist = array(); foreach($array_player as $sid=>$val){ $oid=$config_player[$val]['play_oid']; $playlist[$oid.'-'.$sid]['server_name'] = $array_server[$sid]; $playlist[$oid.'-'.$sid]['server_id'] = $sid; $playlist[$oid.'-'.$sid]['server_url'] = $server[$array_server[$sid]]; $playlist[$oid.'-'.$sid]['player_sid'] = $sid+1; $playlist[$oid.'-'.$sid]['player_title'] = $config_player[$val]['play_title']; $playlist[$oid.'-'.$sid]['player_name'] = $val; $playlist[$oid.'-'.$sid]['player_key'] = $config_player[$val]['play_key']; $playlist[$oid.'-'.$sid]['player_apiurl'] = $config_player[$val]['play_apiurl']; $playlist[$oid.'-'.$sid]['player_copyright'] = $config_player[$val]['play_copyright']; $playlist[$oid.'-'.$sid]['playername'] = $config_player[$val]['play_title']; $playlist[$oid.'-'.$sid]['playname'] = $val; $playlist[$oid.'-'.$sid]['son'] = playlist_one($array['vod_id'],$array['vod_letters'],$array['vod_cid'],$array['vod_copyright'],$list_dir,$sid,$config_player[$val]['play_name'],$val,$array_urllist[$sid]); $playlist[$oid.'-'.$sid]['player_count'] =count($playlist[$oid.'-'.$sid]['son']); } if($array_down_player && $array_down_urllist){ $array_down_player=array_values($array_down_player); $array_down_urllist=array_values($array_down_urllist); $downlist = array(); foreach($array_down_player as $sid=>$val){ $oid=$config_player[$val]['play_oid']; $downlist[$oid.'-'.$sid]['server_name'] = $array_server[$sid]; $downlist[$oid.'-'.$sid]['server_id'] = $sid; $downlist[$oid.'-'.$sid]['server_url'] = $server[$array_server[$sid]]; $downlist[$oid.'-'.$sid]['down_sid'] = $sid+1; $downlist[$oid.'-'.$sid]['down_name'] = $val; $downlist[$oid.'-'.$sid]['down_title'] = $config_player[$val]['play_title']; $downlist[$oid.'-'.$sid]['son'] = downlist_one($array_down_urllist[$sid]); $downlist[$oid.'-'.$sid]['down_count'] =count($downlist[$oid.'-'.$sid]['son']); } } return array($playlist,$downlist); } function playlist_one($vod_id,$vod_letters,$vod_cid,$vod_copyright,$list_dir,$sid,$playname,$playtitle,$playurl){ $config_player = F('_data/player'); $authcode = new \com\AuthCode(); $urllist = array(); $array_url = explode(chr(13),str_replace(array("\r\n", "\n", "\r"),chr(13),$playurl)); foreach($array_url as $key=>$val){ if (strpos($val,'$') > 0) { $ji = explode('$',$val); $urllist[$key]['playname'] = trim($ji[0]); $urllist[$key]['path']= trim($ji[1]); $urllist[$key]['playpic'] = trim($ji[2]); $urllist[$key]['playfen'] = trim($ji[3]); $urllist[$key]['playmiao'] = trim($ji[4]); $urllist[$key]['playsource'] = trim($ji[5]); }else{ $urllist[$key]['playname'] = '第'.($key+1).'集'; $urllist[$key]['path']= trim($val); } if($config_player[$playtitle]['play_key']){ $urllist[$key]['playpath'] = base64_encode($authcode->authcode($urllist[$key]['path'],"ENCODE",$config_player[$playtitle]['play_key'],$config_player[$playtitle]['play_keytime'])); }else{ $urllist[$key]['playpath'] =$urllist[$key]['path']; } $urllist[$key]['playkey']=$key+1; if(config('player_http')==2 || $vod_copyright==3){ $urllist[$key]['playurl']=$urllist[$key]['path']; }else{ $urllist[$key]['playurl'] = zanpian_play_url(array('id'=>$vod_id,'pinyin'=>$vod_letters,'cid'=>$vod_cid,'dir'=>$list_dir,'sid'=>$sid,'pid'=>$key+1)); } } return $urllist; } function downlist_one($playurl){ $urllist = array(); $array_url = explode(chr(13),str_replace(array("\r\n", "\n", "\r"),chr(13),$playurl)); foreach($array_url as $key=>$val){ if (strpos($val,'$') > 0) { $ji = explode('$',$val); $urllist[$key]['downname'] = trim($ji[0]); $urllist[$key]['downpath'] = ThunderEncode(trim($ji[1])); }else{ $urllist[$key]['downname'] = '第'.($key+1).'集'; $urllist[$key]['downpath'] = ThunderEncode(trim($val)); } } return $urllist; } function ThunderEncode($url) { $thunderPrefix="AA"; $thunderPosix="ZZ"; $thunderTitle="thunder://"; $thunderUrl=$thunderTitle.base64_encode($thunderPrefix.$url.$thunderPosix); if (strpos($url,'http://') !== false || strpos($url,'ftp://') !== false){ return $thunderUrl; }else{ return $url; } } function playlist_json($vod_info_array,$vod_url_array){ if(empty($vod_url_array)){return false;} $key = 0; $config_player = F('_data/player'); $authcode = new \com\AuthCode(); foreach($vod_url_array as $val){ $array_urls[$key]['servername'] = ""; $array_urls[$key]['playname'] = $val['player_name']; $array_urls[$key]['playtitle'] = $val['player_title']; foreach($val['son'] as $keysub=>$valsub){ $video = array($valsub["playname"], $valsub["playpath"], $valsub["playurl"]); if($config_player[$val["player_name"]]['play_key']){ $video[1] = base64_encode($authcode->authcode(trim($video[1]),"ENCODE",$config_player[$val["player_name"]]['play_key'],$config_player[$val["player_name"]]['play_keytime'])); } $array_urls[$key]["playurls"][$keysub] = $video; } $key++; } return json_encode(array('Vod'=>$vod_info_array,'Data'=>$array_urls)); } function zanpiancms_player($array){ if(config('player_cloud')){ return '<script src="'.config('player_cloud').'?url='.base64_encode($array['play_path']).'&name='.$array['play_name'].'&co='.$array['player_copyright'].'&api='.base64_encode($array['play_apiurl']).'&time='.$array['play_second'].'&ad='.base64_encode($array['play_adurl']).'&next='.base64_encode($array['play_nextpath']).'"></script>'."\n"; }else{ $data = array(); $data['url'] = $array['play_path']; $data['copyright'] = $array['player_copyright']; $data['name'] = !empty($array['player_copyright']) ? "copyright" : $array['play_name']; $data['apiurl'] = $array['play_apiurl']; $data['adtime'] = $array['play_second']; $data['adurl'] = $array['play_adurl']; $data['next_path'] = $array['play_nextpath']; return '<script>var zanpiancms_player = '.json_encode($data).';</script><script src="'.config('site_path').PUBLIC_PATH.'player/'.$data['name'].'.js"></script>'; } } function adminTreeMenu($array,$pid,$itemtpl,$selectedids='',$disabledids='',$wraptag='ul',$wrapattr='',$deeplevel=0){ $str = ''; $childs = getMenuid($array,$pid); if ($childs){ foreach ($childs as $value){ $id = $value['id']; unset($value['child']); $selected = in_array($id, (is_array($selectedids) ? $selectedids : explode(',', $selectedids))) ? 'selected' : ''; $disabled = in_array($id, (is_array($disabledids) ? $disabledids : explode(',', $disabledids))) ? 'disabled' : ''; $value = array_merge($value, array('selected' => $selected, 'disabled' => $disabled)); $value = array_combine(array_map(function($k){ return '@' . $k; }, array_keys($value)), $value); $bakvalue = array_intersect_key($value, array_flip(['@url', '@caret', '@class'])); $value = array_diff_key($value, $bakvalue); $nstr = strtr($itemtpl, $value); $value = array_merge($value, $bakvalue); $childdata = adminTreeMenu($array,$id, $itemtpl, $selectedids, $disabledids, $wraptag, $wrapattr, $deeplevel + 1); $childlist = $childdata ? "<{$wraptag} {$wrapattr}>" . $childdata . "</{$wraptag}>" : ""; $childlist = strtr($childlist, array('@class' => $childdata ? 'last' : '')); $value = array( '@childlist' => $childlist, '@url' => $childdata || !isset($value['@url']) ? "javascript:;" : $value['@url'], '@caret' => ($childdata && (!isset($value['@badge']) || !$value['@badge']) ? '<i class="fa fa-angle-left"></i>' : ''), '@badge' => isset($value['@badge']) ? $value['@badge'] : '', '@class' => ($selected ? ' active' : '') . ($disabled ? ' disabled' : '') . ($childdata ? ' treeview' : ''), ); $str .= strtr($nstr, $value); } } return $str; } function sys_auth($string, $operation = 'ENCODE', $key = '', $expiry = 0) { $key_length = 4; $fixedkey = md5($key); $egiskeys = md5(substr($fixedkey, 16, 16)); $runtokey = $key_length ? ($operation == 'ENCODE' ? substr(md5(microtime(true)), -$key_length) : substr($string, 0, $key_length)) : ''; $keys = md5(substr($runtokey, 0, 16) . substr($fixedkey, 0, 16) . substr($runtokey, 16) . substr($fixedkey, 16)); $string = $operation == 'ENCODE' ? sprintf('%010d', $expiry ? $expiry + time() : 0).substr(md5($string.$egiskeys), 0, 16) . $string : base64_decode(substr($string, $key_length)); $i = 0; $result = ''; $string_length = strlen($string); for ($i = 0; $i < $string_length; $i++){ $result .= chr(ord($string{$i}) ^ ord($keys{$i % 32})); } if($operation == 'ENCODE') { return $runtokey . str_replace('=', '', base64_encode($result)); } else { if((substr($result, 0, 10) == 0 || substr($result, 0, 10) - time() > 0) && substr($result, 10, 16) == substr(md5(substr($result, 26).$egiskeys), 0, 16)) { return substr($result, 26); } else { return ''; } } } function checkRule($rule, $type = AuthRule::rule_url, $mode = 'url') { static $Auth = null; if (!$Auth) { $Auth = new \com\Auth(); } if (!$Auth->check($rule, session('member_auth.uid'), $type, $mode)) { return false; } return true; } function parse_field_attr($string) { if(is_array ($string)){ return $string; } if (0 === strpos($string, ':')) { return eval('return'.substr($string, 1) . ';'); } elseif (0 === strpos($string, '[')) { return config(substr($string, 1, -1)); } $array = preg_split('/[,;\r\n]+/', trim($string, ",;\r\n")); if (strpos($string, ':')) { $value = array(); foreach ($array as $val) { list($k, $v) = explode(':', $val); $value[$k] = $v; } } else { $value = $array; } return $value; } function baidutui($urls){ if(is_array($urls)){ $urls = $urls; }else{ $urls = array(rtrim(rtrim(config('site_url'),'/').config('site_path'), '/').$urls); } $api = config('baidu_tui'); $ch = curl_init(); $options = array( CURLOPT_URL => $api, CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_CONNECTTIMEOUT => 8, CURLOPT_TIMEOUT => 6, CURLOPT_POSTFIELDS => implode("\n", $urls), CURLOPT_HTTPHEADER => array('Content-Type: text/plain'), ); curl_setopt_array($ch, $options); $result = curl_exec($ch); $success=json_decode($result,true); curl_close($ch); if($success['success']){ return "&nbsp;&nbsp;百度推送<font color=red>".$success['success']."</font>条成功&nbsp;&nbsp;"; }else{ return "&nbsp;&nbsp;百度推送失败&nbsp;&nbsp;"; } }
\think\Config::set(array (
  'app_host' => '',
  'app_debug' => false,
  'app_trace' => false,
  'app_status' => '',
  'app_multi_module' => true,
  'auto_bind_module' => false,
  'root_namespace' => 
  array (
  ),
  'extra_file_list' => 
  array (
    0 => '/home/wwwroot/xichen.tv/thinkphp/helper.php',
  ),
  'default_return_type' => 'html',
  'default_ajax_return' => 'json',
  'default_jsonp_handler' => 'jsonpReturn',
  'var_jsonp_handler' => 'callback',
  'default_timezone' => 'PRC',
  'lang_switch_on' => false,
  'default_filter' => '',
  'default_lang' => 'zh-cn',
  'class_suffix' => false,
  'controller_suffix' => false,
  'default_module' => 'home',
  'deny_module_list' => 
  array (
    0 => 'common',
  ),
  'default_controller' => 'Index',
  'default_action' => 'index',
  'default_validate' => '',
  'empty_controller' => 'Error',
  'use_action_prefix' => false,
  'action_suffix' => '',
  'controller_auto_search' => false,
  'var_pathinfo' => 's',
  'pathinfo_fetch' => 
  array (
    0 => 'ORIG_PATH_INFO',
    1 => 'REDIRECT_PATH_INFO',
    2 => 'REDIRECT_URL',
  ),
  'pathinfo_depr' => '-',
  'https_agent_name' => '',
  'url_html_suffix' => 'html',
  'url_common_param' => false,
  'url_param_type' => 0,
  'url_route_on' => true,
  'route_config_file' => 
  array (
    0 => 'route',
  ),
  'route_complete_match' => false,
  'url_route_must' => false,
  'url_domain_deploy' => true,
  'url_domain_root' => '',
  'url_convert' => true,
  'url_controller_layer' => 'controller',
  'var_method' => '_method',
  'var_ajax' => '_ajax',
  'var_pjax' => '_pjax',
  'request_cache' => false,
  'request_cache_expire' => NULL,
  'request_cache_except' => 
  array (
  ),
  'template' => 
  array (
    'view_path' => '/home/wwwroot/xichen.tv/tpl/home/',
    'tpl_cache' => true,
    'strip_space' => true,
  ),
  'view_replace_str' => 
  array (
    '__TPL__' => '/home/wwwroot/xichen.tv/tpl',
  ),
  'dispatch_success_tmpl' => '/home/wwwroot/xichen.tv/thinkphp/tpl/dispatch_jump.tpl',
  'dispatch_error_tmpl' => '/home/wwwroot/xichen.tv/thinkphp/tpl/dispatch_jump.tpl',
  'exception_tmpl' => '/home/wwwroot/xichen.tv/thinkphp/tpl/think_exception.tpl',
  'error_message' => '页面错误！请稍后再试～',
  'show_error_msg' => false,
  'exception_handle' => '',
  'record_trace' => false,
  'log' => 
  array (
    'type' => 'test',
    'path' => '/home/wwwroot/xichen.tv/runtime/log/',
    'level' => 
    array (
      0 => 'sql',
    ),
  ),
  'trace' => 
  array (
    'type' => 'Html',
  ),
  'cache' => 
  array (
    'type' => 'redis',
    'path' => '/home/wwwroot/xichen.tv/runtime/cache/',
    'prefix' => 'xichen_new_',
    'expire' => 0,
  ),
  'session' => 
  array (
    'id' => '',
    'var_session_id' => '',
    'prefix' => 'zanpiancms',
    'type' => '',
    'auto_start' => true,
  ),
  'cookie' => 
  array (
    'prefix' => 'zanpiancms',
    'expire' => 0,
    'path' => '/',
    'domain' => '',
    'secure' => false,
    'httponly' => '',
    'setcookie' => true,
  ),
  'database' => 
  array (
    'type' => 'mysql',
    'dsn' => '',
    'hostname' => '127.0.0.1',
    'database' => 'xichen_new',
    'username' => 'root',
    'password' => 'DXh19880611',
    'hostport' => '3306',
    'params' => 
    array (
    ),
    'charset' => 'utf8',
    'prefix' => 'ff_',
    'debug' => false,
    'deploy' => 0,
    'rw_separate' => false,
    'master_num' => 1,
    'break_reconnect' => false,
    'slave_no' => '',
    'fields_strict' => false,
    'auto_timestamp' => false,
  ),
  'paginate' => 
  array (
    'type' => 'bootstrap',
    'var_page' => 'page',
    'list_rows' => 15,
  ),
  'config_group_list' => 
  array (
    1 => '网站设置',
    2 => '系统设置',
    3 => '伪静态',
    4 => '缓存设置',
    5 => '附件设置',
    6 => '视频设置',
    7 => '采集设置',
    99 => '高级设置',
  ),
  'auth_config' => 
  array (
    'AUTH_ON' => '1',
    'AUTH_TYPE' => '2',
  ),
  'data_backup_path' => 'databack',
  'data_backup_part_size' => '20971520',
  'data_backup_compress' => '1',
  'data_backup_compress_level' => '9',
  'allow_visit' => 
  array (
    0 => 'index/verify',
    1 => 'index/index',
    2 => 'index/phpinfo',
    3 => 'member/editpwd',
    4 => 'caches/del',
    5 => 'upload/ajax',
    6 => 'get/vod',
    7 => 'getcm/getdouban',
    8 => 'get/keywords',
    9 => 'get/story',
    10 => 'getactor/role',
  ),
  'deny_visit' => 
  array (
    0 => '',
  ),
  'admin_allow_ip' => '',
  'site_name' => '爱看番',
  'site_url' => 'http://www.ikanfan.com',
  'data_cache_port' => '6379',
  'site_description' => '爱看番提供动画片、动漫在线观看。经典动画片大全、热门好看的动漫，尽在爱看番(I站)。',
  'contrast_play' => '1',
  'empty_playurl' => '1',
  'site_keyword' => '动画片,动画片大全,好看的动画片,好看的动漫,日本动漫,日本动画片,爱看番,I站',
  'site_status' => true,
  'site_icp' => '沪ICP备16032125号-3',
  'data_cache_host' => '127.0.0.1',
  'home_pagenum' => '5',
  'admin_order_type' => 'addtime',
  'config_type_list' => 
  array (
    'text' => '单行文本,varchar',
    'char' => '文本char,char',
    'string' => '字符串,int',
    'password' => '密码,varchar',
    'textarea' => '数组文本框,text',
    'notextarea' => '非数组文本框,text',
    'longtext' => '文本框longtext,longtext',
    'bool' => '布尔型,int',
    'select' => '选择,varchar',
    'num' => '数字int,int',
    'smallint' => '数字smallint,smallint',
    'tinyint' => '数字tinyint,smallint',
    'mediumint' => '数字mediumint,mediumint',
    'decimal' => '金额,decimal',
    'tags' => '标签,varchar',
    'datetime' => '时间控件,int',
    'date' => '日期控件,varchar',
    'editor' => '编辑器,text',
    'bind' => '模型绑定,int',
    'pctheme' => '获取网站模版,varchar',
    'mobiletheme' => '获取手机模版,varchar',
    'usertheme' => '获取会员模版,varchar',
    'html' => 'HTML样式,html',
  ),
  'document_position' => 
  array (
    1 => '首页推荐',
    3 => '封面推荐',
    2 => '列表推荐',
    4 => '季番推荐',
  ),
  'site_path' => '/',
  'site_title' => '爱看番 - 小而美的动漫追番网站',
  'site_copyright' => '© 爱看番 [IKANFAN.COM] 所有动画片和动漫均收集引用于各大视频网站，本站只提供动画视频引用，不参与视频制作上传，不提供视频储存下载。<br>
若本站的引用侵犯了您的利益，请联系我们核查所实后将在第一时间删除。欢迎动漫爱好者对本站引用内容进行监督，共创绿色健康互联网。</br> 联系邮箱：t@ikanfan.com 或联系QQ916091535 © 2017 <a href="/" style="font-family:Verdana, Arial, Helvetica, sans-serif;font-weight:bold;color:#f60;">ikanfan<span style="color:#c00;">.Com</span></a>. <a href="http://www.miibeian.gov.cn/" target="_blank">沪ICP备16032125号-3</a> 沪网文（2017）1295-032号 <a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=34130202000158" style="position: relative;top: 5px;display: inline-block;margin-left:5px;font-size:12px;"><img src="http://ww3.sinaimg.cn/large/628d024fgw1f63puhjy82j200k00k3y9.jpg" style="float:left;"><span style="float:left;height:20px;line-height:20px;margin: 0px 0px 0px 5px; color:#939393;">皖公网安备 34130202000158号</span></a><div style="display:none;">
<script src="https://s11.cnzz.com/z_stat.php?id=1257804866&web_id=1257804866" language="JavaScript"></script>
</div>
<!--<p><b style="color:#f00;">本游戏适合18岁以上用户</b><a target="_blank" href="http://www.99496.com/jiazhang/jiazhang.html">网络游戏未成年人家长监护工程</a></p>
    <p>抵制不良游戏 拒绝盗版游戏 注意自我保护 谨防受骗上当 适度游戏益脑 沉迷游戏伤身 合理安排时间 享受健康生活</p>-->',
  'site_hotkeywords' => '',
  'site_tongji' => '',
  'site_email' => 't@ikanfan.com',
  'default_theme' => '#!xichen',
  'mobile_url' => 'http://m.ikanfan.com',
  'user_theme' => 'new',
  'site_cssjsurl' => '//static.ikanfan.cn/2017/',
  'admin_time_edit' => '1',
  'admin_ads_file' => 'runtime/ad',
  'admin_list_pages' => '30',
  'baidu_tui' => '',
  'news_images' => '4',
  'admin_letters' => '2',
  'keywords_openadd' => '0',
  'keywords_opencai' => '0',
  'upload_path' => 'uploads',
  'upload_style' => 'Y-m-d',
  'pic_pinyin' => '0',
  'upload_class' => 'jpg,gif,png,jpeg,bmp',
  'upload_http_down' => '10',
  'upload_http' => '0',
  'upload_http_news' => '0',
  'upload_thumb' => '0',
  'upload_thumb_size' => '220/307',
  'upload_thumb_pos' => '1',
  'upload_water' => '0',
  'upload_water_pct' => '75',
  'upload_water_pos' => '1',
  'upload_water_img' => 'water.gif',
  'upload_ftp' => '1',
  'upload_ftp_del' => '1',
  'upload_ftp_host' => '127.0.0.1',
  'upload_ftp_user' => 'OGZMGjw1ELEMmvec/ikanfan-upload',
  'upload_ftp_pass' => '4cbG4EyJJK7tnKVAO90vDIZjGteSG3',
  'upload_ftp_port' => '2048',
  'upload_ftp_dir' => '/',
  'upload_http_prefix' => 'http://p0.99496.com/uploads/',
  'player_http' => '0',
  'player_width' => '100%',
  'player_height' => '480px',
  'player_second' => '5',
  'player_playad' => 'http://cdn.97bike.com/loading.html',
  'play_collect' => '0',
  'rand_tag' => '0',
  'player_collect_name' => '0',
  'player_collect_time' => '5',
  'rand_hits' => '9999',
  'rand_updown' => '9',
  'rand_gold' => '10',
  'rand_golder' => '9',
  'cai_baidutui' => '0',
  'replace_play' => 
  array (
    'ykyun' => 'youyun',
    'youku' => 'yuku',
    'iqiyi' => 'qiyi',
  ),
  'caiji_pic' => '0',
  'caiji_play' => '1',
  'caiji_datatime' => '1',
  'caiji_addtime' => '1',
  'api_cai_limit' => '5',
  'caiji_vodtime' => '1',
  'mobile_theme' => '#!mxichen',
  'user_status' => '1',
  'api_pic' => 'http://api.97bike.com/pic.php?url=',
  'http_api' => 
  array (
    1 => 'v.97bike.com',
    2 => 'v1.97bike.com',
    3 => 'v2.97bike.com',
    4 => 'v3.97bike.com',
    5 => 'v4.97bike.com',
  ),
  'play_area' => '大陆,日本,香港,台湾,美国,韩国,泰国,新加坡,马来西亚,印度,英国,法国,加拿大,西班牙,俄罗斯,其它',
  'play_year' => '2020,2019,2018,2017,2016,2015,2014,2013,2012,2011,2010,2009,2008,2007,2006,2005,2004,2003,2002,2001,2000,1990,1980,1970,1960,1950',
  'play_language' => '国语,日语,英语,粤语,闽南语,韩语,国语/粤语,其它',
  'story_cidarray' => 
  array (
    0 => '',
  ),
  'actor_cidarray' => 
  array (
    0 => 'all',
  ),
  'role_cidarray' => 
  array (
    0 => 'all',
  ),
  'news_pic' => '0',
  'auto_tag' => '0',
  'week_list' => 
  array (
    1 => '星期一',
    2 => '星期二',
    3 => '星期三',
    4 => '星期四',
    5 => '星期五',
    6 => '星期六',
    7 => '星期七',
  ),
  'copyright_txt' => '该视频由于版权限制，暂不提供播放。',
  'force_collect' => '0',
  'tpl_id' => 
  array (
    1 => '1',
    2 => '2',
    3 => '3',
    4 => '4',
    5 => '5',
    6 => '6',
    7 => '7',
    8 => '8',
    9 => '9',
    10 => '10',
    11 => '11',
    12 => '12',
    13 => '13',
    14 => '14',
    15 => '15',
    16 => '16',
    17 => '63',
    18 => '67',
    19 => '65',
    20 => '64',
    21 => '66',
  ),
  'data_cache_vod' => '86400',
  'data_cache_story' => '86400',
  'data_cache_actor' => '86400',
  'data_cache_role' => '86400',
  'data_cache_tv' => '86400',
  'data_cache_star' => '86400',
  'data_cache_news' => '86400',
  'data_cache_foreach' => '600',
  'data_cache_type' => 'redis',
  'tpl_cache' => true,
  'strip_space' => true,
  'config_app_debug' => '0',
  'config_app_trace' => '0',
  'log_type' => 'test',
  'url_rewrite' => '1',
  'user_rewrite' => '1',
  'user_rewrite_route' => 
  array (
    'user-reg-index' => 'user/reg',
    'user-reg-index-api-1' => 'user/regsns',
    'user-reg-agreement' => 'user/agreement',
    'user-login-index' => 'user/login',
    'user-snslogin-qq' => 'user/qq',
    'user-snslogin-weibo' => 'user/weibo',
    'user-login-forgetpwd' => 'user/forgetpwd',
    'user-login-repass-code-(#char)' => 'user/repass/($code)',
    'user-center-index' => 'member/',
    'user-center-info' => 'member/info',
    'user-center-email' => 'member/email',
    'user-center-avatar' => 'member/avatar',
    'user-center-syncs' => 'member/syncs',
    'user-center-pwd' => 'member/pwd',
    'user-center-remind' => 'member/remind',
    'user-center-love' => 'member/love',
    'user-center-cm' => 'member/cm',
    'user-center-gb' => 'member/gb',
    'user-center-playlog' => 'member/playlog',
    'user-center-msg' => 'member/msg',
    'home-search-index' => 'search/',
    'home-special-read-id-(#num)-pinyin-(#char)-cid-(#num)-dir-(#char)' => 'special/($id)/',
    'home-tv-read-id-(#num)-pinyin-(#char)-cid-(#num)-dir-(#char)' => 'tv/($id)',
    'home-tv-read-id-(#num)-pinyin-(#char)-cid-(#num)-dir-(#char)-p-(#num)' => 'tv/($id)-($p)',
    'home-tag-show-id-(#num)-dir-(#char)-tag-(#vhar)' => 'tag/($id)-$tag',
    'home-tag-show-id-(#num)-dir-(#char)-tag-(#vhar)-p-(#num)' => 'tag/($id)-$tag-($p)',
    'home-map-show-id-(#num)-dir-(#char)' => 'map/($dir)',
    'home-gb-show' => 'gb/',
    'home-gb-show-id-(#num)' => 'gb/($id)',
    'home-gb-show-id-(#num)-p-(#num)' => 'gb/($id)-($p)',
    'home-search-index-wd-(#vhar)-p-(#num)' => 'search/($wd)-($p)',
    'home-search-index-wd-(#vhar)' => 'search/($wd)',
    'user-home-index-id-(#num)' => 'user/($id)/',
    'home-vod-read-id-(#num)-pinyin-(#char)-cid-(#num)-dir-(#char)' => 'ac/($id)/',
    'home-vod-filmtime-id-(#num)-pinyin-(#char)-cid-(#num)-dir-(#char)' => 'time/($id)/',
    'home-vod-news-id-(#num)-pinyin-(#char)-cid-(#num)-dir-(#char)-p-(#num)' => 'ac/($id)/news/($p)/',
    'home-vod-news-id-(#num)-pinyin-(#char)-cid-(#num)-dir-(#char)' => 'ac/($id)/news/',
    'home-vod-play-id-(#num)-pinyin-(#char)-cid-(#num)-dir-(#char)-sid-(#char)-pid-(#num)' => 'ac/($id)/($sid)-($pid)',
    'home-news-read-id-(#num)-cid-(#num)-dir-(#char)-p-(#num)' => 'article/($id)-($p)',
    'home-news-read-id-(#num)-cid-(#num)-dir-(#char)' => 'article/($id)',
    'home-story-read-id-(#num)-pinyin-(#char)-cid-(#num)-dir-(#char)' => 'plot/($id)/',
    'home-story-read-id-(#num)-pinyin-(#char)-cid-(#num)-dir-(#char)-p-(#num)' => 'plot/($id)/($p)/',
    'home-actor-read-id-(#num)-pinyin-(#char)-cid-(#num)-dir-(#char)' => 'actor/($id)/',
    'home-role-read-id-(#num)-pinyin-(#char)-cid-(#num)-dir-(#char)' => 'role/($id)/',
    'home-star-read-id-(#num)-pinyin-(#char)-cid-(#num)-dir-(#char)' => 'star/($id)/',
    'home-star-work-id-(#num)-pinyin-(#char)-cid-(#num)-dir-(#char)-p-(#num)' => 'star/($id)/work/($p)',
    'home-star-work-id-(#num)-pinyin-(#char)-cid-(#num)-dir-(#char)' => 'star/($id)/work/',
    'home-star-hz-id-(#num)-pinyin-(#char)-cid-(#num)-dir-(#char)-p-(#num)' => 'star/($id)/partner/($p)/',
    'home-star-hz-id-(#num)-pinyin-(#char)-cid-(#num)-dir-(#char)' => 'star/($id)/partner/',
    'home-star-news-id-(#num)-pinyin-(#char)-cid-(#num)-dir-(#char)-p-(#num)' => 'star/($id)/news/($p)/',
    'home-star-news-id-(#num)-pinyin-(#char)-cid-(#num)-dir-(#char)' => 'star/($id)/news/',
    'home-star-role-id-(#num)-pinyin-(#char)-cid-(#num)-dir-(#char)-p-(#num)' => 'star/($id)/role/($p)/',
    'home-star-role-id-(#num)-pinyin-(#char)-cid-(#num)-dir-(#char)' => 'star/($id)/role/',
    'home-vod-type-id-(#num)-dir-(#char)-mcid-(#vhar)-area-(#vhar)-year-(#vhar)-letter-(#vhar)-order-(#vhar)-p-(#vhar)' => '($dir)/index_($mcid)_($area)_($year)_($letter)_($order)_($p)',
    'home-vod-type-id-(#num)-dir-(#char)-mcid-(#vhar)-area-(#vhar)-year-(#vhar)-letter-(#vhar)-order-(#vhar)' => '($dir)/index_($mcid)_($area)_($year)_($letter)_($order)',
    'home-star-type-id-(#num)-dir-(#char)-sex-(#vhar)-zy-(#vhar)-area-(#vhar)-letter-(#vhar)-order-(#vhar)-p-(#vhar)' => '($dir)/($sex)_($zy)_($area)_($letter)_($order)_($p)',
    'home-star-type-id-(#num)-dir-(#char)-sex-(#vhar)-zy-(#vhar)-area-(#vhar)-letter-(#vhar)-order-(#vhar)' => '($dir)/($sex)_($zy)_($area)_($letter)_($order)',
    'home-vod-show-id-(#num)-dir-(#char)-p-(#num)' => '($dir)/index($p)',
    'home-vod-show-id-(#num)-dir-(#char)' => '($dir)/',
    'home-news-show-id-(#num)-dir-(#char)-p-(#num)' => '($dir)/index($p)',
    'home-news-show-id-(#num)-dir-(#char)' => '($dir)/',
    'home-story-show-id-(#num)-dir-(#char)-p-(#num)' => '($dir)/index($p)',
    'home-story-show-id-(#num)-dir-(#char)' => '($dir)/',
    'home-actor-show-id-(#num)-dir-(#char)-p-(#num)' => '($dir)/index($p)',
    'home-actor-show-id-(#num)-dir-(#char)' => '($dir)/',
    'home-role-show-id-(#num)-dir-(#char)-p-(#num)' => '($dir)/index($p)',
    'home-role-show-id-(#num)-dir-(#char)' => '($dir)/',
    'home-star-show-id-(#num)-dir-(#char)-p-(#num)' => '($dir)/index($p)',
    'home-star-show-id-(#num)-dir-(#char)' => '($dir)/',
    'home-special-show-id-(#num)-dir-(#char)-p-(#num)' => '($dir)/index($p)',
    'home-special-show-id-(#num)-dir-(#char)' => '($dir)/',
    'home-tv-show-id-(#num)-dir-(#char)-p-(#num)' => '($dir)/index($p)',
    'home-tv-show-id-(#num)-dir-(#char)' => '($dir)/',
    'home-up-show-id-(#num)-dir-(#char)-month-(#num)' => '($dir)/($month)/',
    'home-up-show-id-(#num)-dir-(#char)-month-(#num)-p-(#num)' => '($dir)/($month)/($p)/',
    'home-up-show-id-(#num)-dir-(#char)-type-(#char)' => '($dir)/($id)/($type)/',
    'home-up-show-id-(#num)-dir-(#char)-type-(#char)-p-(#num)' => '($dir)/($id)/($type)/($p)/',
    'home-my-show-id-(#num)-dir-(#char)' => '($dir)',
  ),
  'player_cloud' => 'http://cdn.97bike.com/player/',
  'player_api' => 'https://www.ikanfan.cn/api/play.php?type=',
  'html_cache_on' => '1',
  'html_cache_index' => '600',
  'html_cache_vod_list' => '600',
  'html_cache_vod_type' => '600',
  'html_cache_vod_read' => '600',
  'html_cache_vod_play' => '600',
  'html_cache_vod_other' => '600',
  'html_cache_news_list' => '600',
  'html_cache_news_read' => '600',
  'html_cache_star_list' => '600',
  'html_cache_star_type' => '600',
  'html_cache_star_read' => '600',
  'html_cache_star_other' => '600',
  'html_cache_story_list' => '600',
  'html_cache_story_read' => '600',
  'html_cache_actor_list' => '600',
  'html_cache_actor_read' => '600',
  'html_cache_role_list' => '600',
  'html_cache_role_read' => '600',
  'html_cache_tv_list' => '600',
  'html_cache_tv_read' => '600',
  'html_cache_special_list' => '600',
  'html_cache_special_read' => '600',
  'html_cache_my_list' => '600',
  'zanpiancms_login' => '=wHM%1T1HX!zxo',
  'data_cache_password' => '',
  'data_cache_prefix' => 'xichen_new_',
  'url_domain_rules' => 
  array (
    0 => 'm.ikanfan.com',
    1 => 'home?theme=mobile',
  ),
  'route_rules' => 
  array (
    'user/reg/index' => 
    array (
      'find' => 1,
      'replace' => 'user/regsns',
    ),
    'user/reg/agreement' => 
    array (
      'find' => 1,
      'replace' => 'user/agreement',
    ),
    'user/login/index' => 
    array (
      'find' => 1,
      'replace' => 'user/login',
    ),
    'user/snslogin/qq' => 
    array (
      'find' => 1,
      'replace' => 'user/qq',
    ),
    'user/snslogin/weibo' => 
    array (
      'find' => 1,
      'replace' => 'user/weibo',
    ),
    'user/login/forgetpwd' => 
    array (
      'find' => 1,
      'replace' => 'user/forgetpwd',
    ),
    'user/login/repass/code' => 
    array (
      'find' => 
      array (
        0 => '$code',
      ),
      'replace' => 'user/repass/$code',
    ),
    'user/center/index' => 
    array (
      'find' => 1,
      'replace' => 'member/',
    ),
    'user/center/info' => 
    array (
      'find' => 1,
      'replace' => 'member/info',
    ),
    'user/center/email' => 
    array (
      'find' => 1,
      'replace' => 'member/email',
    ),
    'user/center/avatar' => 
    array (
      'find' => 1,
      'replace' => 'member/avatar',
    ),
    'user/center/syncs' => 
    array (
      'find' => 1,
      'replace' => 'member/syncs',
    ),
    'user/center/pwd' => 
    array (
      'find' => 1,
      'replace' => 'member/pwd',
    ),
    'user/center/remind' => 
    array (
      'find' => 1,
      'replace' => 'member/remind',
    ),
    'user/center/love' => 
    array (
      'find' => 1,
      'replace' => 'member/love',
    ),
    'user/center/cm' => 
    array (
      'find' => 1,
      'replace' => 'member/cm',
    ),
    'user/center/gb' => 
    array (
      'find' => 1,
      'replace' => 'member/gb',
    ),
    'user/center/playlog' => 
    array (
      'find' => 1,
      'replace' => 'member/playlog',
    ),
    'user/center/msg' => 
    array (
      'find' => 1,
      'replace' => 'member/msg',
    ),
    'home/search/index' => 
    array (
      'find' => 1,
      'replace' => 'search/',
    ),
    'home/special/read/id/pinyin/cid/dir' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$pinyin',
        2 => '$cid',
        3 => '$dir',
      ),
      'replace' => 'special/$id/',
    ),
    'home/tv/read/id/pinyin/cid/dir' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$pinyin',
        2 => '$cid',
        3 => '$dir',
      ),
      'replace' => 'tv/$id',
    ),
    'home/tv/read/id/pinyin/cid/dir/p' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$pinyin',
        2 => '$cid',
        3 => '$dir',
        4 => '$p',
      ),
      'replace' => 'tv/$id-$p',
    ),
    'home/tag/show/id/dir/tag' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$dir',
        2 => '$tag',
      ),
      'replace' => 'tag/$id-$tag',
    ),
    'home/tag/show/id/dir/tag/p' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$dir',
        2 => '$tag',
        3 => '$p',
      ),
      'replace' => 'tag/$id-$tag-$p',
    ),
    'home/map/show/id/dir' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$dir',
      ),
      'replace' => 'map/$dir',
    ),
    'home/gb/show' => 
    array (
      'find' => 1,
      'replace' => 'gb/',
    ),
    'home/gb/show/id' => 
    array (
      'find' => 
      array (
        0 => '$id',
      ),
      'replace' => 'gb/$id',
    ),
    'home/gb/show/id/p' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$p',
      ),
      'replace' => 'gb/$id-$p',
    ),
    'home/search/index/wd/p' => 
    array (
      'find' => 
      array (
        0 => '$wd',
        1 => '$p',
      ),
      'replace' => 'search/$wd-$p',
    ),
    'home/search/index/wd' => 
    array (
      'find' => 
      array (
        0 => '$wd',
      ),
      'replace' => 'search/$wd',
    ),
    'user/home/index/id' => 
    array (
      'find' => 
      array (
        0 => '$id',
      ),
      'replace' => 'user/$id/',
    ),
    'home/vod/read/id/pinyin/cid/dir' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$pinyin',
        2 => '$cid',
        3 => '$dir',
      ),
      'replace' => 'ac/$id/',
    ),
    'home/vod/filmtime/id/pinyin/cid/dir' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$pinyin',
        2 => '$cid',
        3 => '$dir',
      ),
      'replace' => 'time/$id/',
    ),
    'home/vod/news/id/pinyin/cid/dir/p' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$pinyin',
        2 => '$cid',
        3 => '$dir',
        4 => '$p',
      ),
      'replace' => 'ac/$id/news/$p/',
    ),
    'home/vod/news/id/pinyin/cid/dir' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$pinyin',
        2 => '$cid',
        3 => '$dir',
      ),
      'replace' => 'ac/$id/news/',
    ),
    'home/vod/play/id/pinyin/cid/dir/sid/pid' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$pinyin',
        2 => '$cid',
        3 => '$dir',
        4 => '$sid',
        5 => '$pid',
      ),
      'replace' => 'ac/$id/$sid-$pid',
    ),
    'home/news/read/id/cid/dir/p' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$cid',
        2 => '$dir',
        3 => '$p',
      ),
      'replace' => 'article/$id-$p',
    ),
    'home/news/read/id/cid/dir' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$cid',
        2 => '$dir',
      ),
      'replace' => 'article/$id',
    ),
    'home/story/read/id/pinyin/cid/dir' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$pinyin',
        2 => '$cid',
        3 => '$dir',
      ),
      'replace' => 'plot/$id/',
    ),
    'home/story/read/id/pinyin/cid/dir/p' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$pinyin',
        2 => '$cid',
        3 => '$dir',
        4 => '$p',
      ),
      'replace' => 'plot/$id/$p/',
    ),
    'home/actor/read/id/pinyin/cid/dir' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$pinyin',
        2 => '$cid',
        3 => '$dir',
      ),
      'replace' => 'actor/$id/',
    ),
    'home/role/read/id/pinyin/cid/dir' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$pinyin',
        2 => '$cid',
        3 => '$dir',
      ),
      'replace' => 'role/$id/',
    ),
    'home/star/read/id/pinyin/cid/dir' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$pinyin',
        2 => '$cid',
        3 => '$dir',
      ),
      'replace' => 'star/$id/',
    ),
    'home/star/work/id/pinyin/cid/dir/p' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$pinyin',
        2 => '$cid',
        3 => '$dir',
        4 => '$p',
      ),
      'replace' => 'star/$id/work/$p',
    ),
    'home/star/work/id/pinyin/cid/dir' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$pinyin',
        2 => '$cid',
        3 => '$dir',
      ),
      'replace' => 'star/$id/work/',
    ),
    'home/star/hz/id/pinyin/cid/dir/p' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$pinyin',
        2 => '$cid',
        3 => '$dir',
        4 => '$p',
      ),
      'replace' => 'star/$id/partner/$p/',
    ),
    'home/star/hz/id/pinyin/cid/dir' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$pinyin',
        2 => '$cid',
        3 => '$dir',
      ),
      'replace' => 'star/$id/partner/',
    ),
    'home/star/news/id/pinyin/cid/dir/p' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$pinyin',
        2 => '$cid',
        3 => '$dir',
        4 => '$p',
      ),
      'replace' => 'star/$id/news/$p/',
    ),
    'home/star/news/id/pinyin/cid/dir' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$pinyin',
        2 => '$cid',
        3 => '$dir',
      ),
      'replace' => 'star/$id/news/',
    ),
    'home/star/role/id/pinyin/cid/dir/p' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$pinyin',
        2 => '$cid',
        3 => '$dir',
        4 => '$p',
      ),
      'replace' => 'star/$id/role/$p/',
    ),
    'home/star/role/id/pinyin/cid/dir' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$pinyin',
        2 => '$cid',
        3 => '$dir',
      ),
      'replace' => 'star/$id/role/',
    ),
    'home/vod/type/id/dir/mcid/area/year/letter/order/p' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$dir',
        2 => '$mcid',
        3 => '$area',
        4 => '$year',
        5 => '$letter',
        6 => '$order',
        7 => '$p',
      ),
      'replace' => '$dir/index_$mcid_$area_$year_$letter_$order_$p',
    ),
    'home/vod/type/id/dir/mcid/area/year/letter/order' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$dir',
        2 => '$mcid',
        3 => '$area',
        4 => '$year',
        5 => '$letter',
        6 => '$order',
      ),
      'replace' => '$dir/index_$mcid_$area_$year_$letter_$order',
    ),
    'home/star/type/id/dir/sex/zy/area/letter/order/p' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$dir',
        2 => '$sex',
        3 => '$zy',
        4 => '$area',
        5 => '$letter',
        6 => '$order',
        7 => '$p',
      ),
      'replace' => '$dir/$sex_$zy_$area_$letter_$order_$p',
    ),
    'home/star/type/id/dir/sex/zy/area/letter/order' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$dir',
        2 => '$sex',
        3 => '$zy',
        4 => '$area',
        5 => '$letter',
        6 => '$order',
      ),
      'replace' => '$dir/$sex_$zy_$area_$letter_$order',
    ),
    'home/vod/show/id/dir/p' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$dir',
        2 => '$p',
      ),
      'replace' => '$dir/index$p',
    ),
    'home/vod/show/id/dir' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$dir',
      ),
      'replace' => '$dir/',
    ),
    'home/news/show/id/dir/p' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$dir',
        2 => '$p',
      ),
      'replace' => '$dir/index$p',
    ),
    'home/news/show/id/dir' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$dir',
      ),
      'replace' => '$dir/',
    ),
    'home/story/show/id/dir/p' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$dir',
        2 => '$p',
      ),
      'replace' => '$dir/index$p',
    ),
    'home/story/show/id/dir' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$dir',
      ),
      'replace' => '$dir/',
    ),
    'home/actor/show/id/dir/p' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$dir',
        2 => '$p',
      ),
      'replace' => '$dir/index$p',
    ),
    'home/actor/show/id/dir' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$dir',
      ),
      'replace' => '$dir/',
    ),
    'home/role/show/id/dir/p' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$dir',
        2 => '$p',
      ),
      'replace' => '$dir/index$p',
    ),
    'home/role/show/id/dir' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$dir',
      ),
      'replace' => '$dir/',
    ),
    'home/star/show/id/dir/p' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$dir',
        2 => '$p',
      ),
      'replace' => '$dir/index$p',
    ),
    'home/star/show/id/dir' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$dir',
      ),
      'replace' => '$dir/',
    ),
    'home/special/show/id/dir/p' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$dir',
        2 => '$p',
      ),
      'replace' => '$dir/index$p',
    ),
    'home/special/show/id/dir' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$dir',
      ),
      'replace' => '$dir/',
    ),
    'home/tv/show/id/dir/p' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$dir',
        2 => '$p',
      ),
      'replace' => '$dir/index$p',
    ),
    'home/tv/show/id/dir' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$dir',
      ),
      'replace' => '$dir/',
    ),
    'home/up/show/id/dir/month' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$dir',
        2 => '$month',
      ),
      'replace' => '$dir/$month/',
    ),
    'home/up/show/id/dir/month/p' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$dir',
        2 => '$month',
        3 => '$p',
      ),
      'replace' => '$dir/$month/$p/',
    ),
    'home/up/show/id/dir/type' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$dir',
        2 => '$type',
      ),
      'replace' => '$dir/$id/$type/',
    ),
    'home/up/show/id/dir/type/p' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$dir',
        2 => '$type',
        3 => '$p',
      ),
      'replace' => '$dir/$id/$type/$p/',
    ),
    'home/my/show/id/dir' => 
    array (
      'find' => 
      array (
        0 => '$id',
        1 => '$dir',
      ),
      'replace' => '$dir',
    ),
  ),
  'rewrite_rules' => 
  array (
    1 => 
    array (
      'rewrite' => 'user/reg',
      'url' => 'user-reg-index',
    ),
    2 => 
    array (
      'rewrite' => 'user/regsns',
      'url' => 'user-reg-index-api-1',
    ),
    3 => 
    array (
      'rewrite' => 'user/agreement',
      'url' => 'user-reg-agreement',
    ),
    4 => 
    array (
      'rewrite' => 'user/login',
      'url' => 'user-login-index',
    ),
    5 => 
    array (
      'rewrite' => 'user/qq',
      'url' => 'user-snslogin-qq',
    ),
    6 => 
    array (
      'rewrite' => 'user/weibo',
      'url' => 'user-snslogin-weibo',
    ),
    7 => 
    array (
      'rewrite' => 'user/forgetpwd',
      'url' => 'user-login-forgetpwd',
    ),
    8 => 
    array (
      'rewrite' => 'user/repass/([a-zA-Z0-9\\-]+)',
      'url' => 'user-login-repass-code-$1',
    ),
    9 => 
    array (
      'rewrite' => 'member/',
      'url' => 'user-center-index',
    ),
    10 => 
    array (
      'rewrite' => 'member/info',
      'url' => 'user-center-info',
    ),
    11 => 
    array (
      'rewrite' => 'member/email',
      'url' => 'user-center-email',
    ),
    12 => 
    array (
      'rewrite' => 'member/avatar',
      'url' => 'user-center-avatar',
    ),
    13 => 
    array (
      'rewrite' => 'member/syncs',
      'url' => 'user-center-syncs',
    ),
    14 => 
    array (
      'rewrite' => 'member/pwd',
      'url' => 'user-center-pwd',
    ),
    15 => 
    array (
      'rewrite' => 'member/remind',
      'url' => 'user-center-remind',
    ),
    16 => 
    array (
      'rewrite' => 'member/love',
      'url' => 'user-center-love',
    ),
    17 => 
    array (
      'rewrite' => 'member/cm',
      'url' => 'user-center-cm',
    ),
    18 => 
    array (
      'rewrite' => 'member/gb',
      'url' => 'user-center-gb',
    ),
    19 => 
    array (
      'rewrite' => 'member/playlog',
      'url' => 'user-center-playlog',
    ),
    20 => 
    array (
      'rewrite' => 'member/msg',
      'url' => 'user-center-msg',
    ),
    21 => 
    array (
      'rewrite' => 'search/',
      'url' => 'home-search-index',
    ),
    22 => 
    array (
      'rewrite' => 'special/([0-9]+)/',
      'url' => 'home-special-read-id-$1',
    ),
    23 => 
    array (
      'rewrite' => 'tv/([0-9]+)',
      'url' => 'home-tv-read-id-$1',
    ),
    24 => 
    array (
      'rewrite' => 'tv/([0-9]+)-([0-9]+)',
      'url' => 'home-tv-read-id-$1-p-$2',
    ),
    25 => 
    array (
      'rewrite' => 'tag/([0-9]+)-(.*)',
      'url' => 'home-tag-show-id-$1',
    ),
    26 => 
    array (
      'rewrite' => 'tag/([0-9]+)-(.*)-([0-9]+)',
      'url' => 'home-tag-show-id-$1-p-$2',
    ),
    27 => 
    array (
      'rewrite' => 'map/([a-zA-Z0-9\\-]+)',
      'url' => 'home-map-show-dir-$1',
    ),
    28 => 
    array (
      'rewrite' => 'gb/',
      'url' => 'home-gb-show',
    ),
    29 => 
    array (
      'rewrite' => 'gb/([0-9]+)',
      'url' => 'home-gb-show-id-$1',
    ),
    30 => 
    array (
      'rewrite' => 'gb/([0-9]+)-([0-9]+)',
      'url' => 'home-gb-show-id-$1-p-$2',
    ),
    31 => 
    array (
      'rewrite' => 'search/(.*)-([0-9]+)',
      'url' => 'home-search-index-wd-$1-p-$2',
    ),
    32 => 
    array (
      'rewrite' => 'search/(.*)',
      'url' => 'home-search-index-wd-$1',
    ),
    33 => 
    array (
      'rewrite' => 'user/([0-9]+)/',
      'url' => 'user-home-index-id-$1',
    ),
    34 => 
    array (
      'rewrite' => 'ac/([0-9]+)/',
      'url' => 'home-vod-read-id-$1',
    ),
    35 => 
    array (
      'rewrite' => 'time/([0-9]+)/',
      'url' => 'home-vod-filmtime-id-$1',
    ),
    36 => 
    array (
      'rewrite' => 'ac/([0-9]+)/news/([0-9]+)/',
      'url' => 'home-vod-news-id-$1-p-$2',
    ),
    37 => 
    array (
      'rewrite' => 'ac/([0-9]+)/news/',
      'url' => 'home-vod-news-id-$1',
    ),
    38 => 
    array (
      'rewrite' => 'ac/([0-9]+)/([a-zA-Z0-9\\-]+)-([0-9]+)',
      'url' => 'home-vod-play-id-$1-sid-$2-pid-$3',
    ),
    39 => 
    array (
      'rewrite' => 'article/([0-9]+)-([0-9]+)',
      'url' => 'home-news-read-id-$1-p-$2',
    ),
    40 => 
    array (
      'rewrite' => 'article/([0-9]+)',
      'url' => 'home-news-read-id-$1',
    ),
    41 => 
    array (
      'rewrite' => 'plot/([0-9]+)/',
      'url' => 'home-story-read-id-$1',
    ),
    42 => 
    array (
      'rewrite' => 'plot/([0-9]+)/([0-9]+)/',
      'url' => 'home-story-read-id-$1-p-$2',
    ),
    43 => 
    array (
      'rewrite' => 'actor/([0-9]+)/',
      'url' => 'home-actor-read-id-$1',
    ),
    44 => 
    array (
      'rewrite' => 'role/([0-9]+)/',
      'url' => 'home-role-read-id-$1',
    ),
    45 => 
    array (
      'rewrite' => 'star/([0-9]+)/',
      'url' => 'home-star-read-id-$1',
    ),
    46 => 
    array (
      'rewrite' => 'star/([0-9]+)/work/([0-9]+)',
      'url' => 'home-star-work-id-$1-p-$2',
    ),
    47 => 
    array (
      'rewrite' => 'star/([0-9]+)/work/',
      'url' => 'home-star-work-id-$1',
    ),
    48 => 
    array (
      'rewrite' => 'star/([0-9]+)/partner/([0-9]+)/',
      'url' => 'home-star-hz-id-$1-p-$2',
    ),
    49 => 
    array (
      'rewrite' => 'star/([0-9]+)/partner/',
      'url' => 'home-star-hz-id-$1',
    ),
    50 => 
    array (
      'rewrite' => 'star/([0-9]+)/news/([0-9]+)/',
      'url' => 'home-star-news-id-$1-p-$2',
    ),
    51 => 
    array (
      'rewrite' => 'star/([0-9]+)/news/',
      'url' => 'home-star-news-id-$1',
    ),
    52 => 
    array (
      'rewrite' => 'star/([0-9]+)/role/([0-9]+)/',
      'url' => 'home-star-role-id-$1-p-$2',
    ),
    53 => 
    array (
      'rewrite' => 'star/([0-9]+)/role/',
      'url' => 'home-star-role-id-$1',
    ),
    54 => 
    array (
      'rewrite' => '([a-zA-Z0-9\\-]+)/index_(.*)_(.*)_(.*)_(.*)_(.*)_(.*)',
      'url' => 'home-vod-type-dir-$1-mcid-$2-area-$3-year-$4-letter-$5-order-$6-p-$7',
    ),
    55 => 
    array (
      'rewrite' => '([a-zA-Z0-9\\-]+)/index_(.*)_(.*)_(.*)_(.*)_(.*)',
      'url' => 'home-vod-type-dir-$1-mcid-$2-area-$3-year-$4-letter-$5-order-$6',
    ),
    56 => 
    array (
      'rewrite' => '([a-zA-Z0-9\\-]+)/(.*)_(.*)_(.*)_(.*)_(.*)_(.*)',
      'url' => 'home-star-type-dir-$1-sex-$2-zy-$3-area-$4-letter-$5-order-$6-p-$7',
    ),
    57 => 
    array (
      'rewrite' => '([a-zA-Z0-9\\-]+)/(.*)_(.*)_(.*)_(.*)_(.*)',
      'url' => 'home-star-type-dir-$1-sex-$2-zy-$3-area-$4-letter-$5-order-$6',
    ),
    58 => 
    array (
      'rewrite' => '([a-zA-Z0-9\\-]+)/index([0-9]+)',
      'url' => 'home-vod-show-dir-$1-p-$2',
    ),
    59 => 
    array (
      'rewrite' => '([a-zA-Z0-9\\-]+)/',
      'url' => 'home-vod-show-dir-$1',
    ),
    60 => 
    array (
      'rewrite' => '([a-zA-Z0-9\\-]+)/index([0-9]+)',
      'url' => 'home-news-show-dir-$1-p-$2',
    ),
    61 => 
    array (
      'rewrite' => '([a-zA-Z0-9\\-]+)/',
      'url' => 'home-news-show-dir-$1',
    ),
    62 => 
    array (
      'rewrite' => '([a-zA-Z0-9\\-]+)/index([0-9]+)',
      'url' => 'home-story-show-dir-$1-p-$2',
    ),
    63 => 
    array (
      'rewrite' => '([a-zA-Z0-9\\-]+)/',
      'url' => 'home-story-show-dir-$1',
    ),
    64 => 
    array (
      'rewrite' => '([a-zA-Z0-9\\-]+)/index([0-9]+)',
      'url' => 'home-actor-show-dir-$1-p-$2',
    ),
    65 => 
    array (
      'rewrite' => '([a-zA-Z0-9\\-]+)/',
      'url' => 'home-actor-show-dir-$1',
    ),
    66 => 
    array (
      'rewrite' => '([a-zA-Z0-9\\-]+)/index([0-9]+)',
      'url' => 'home-role-show-dir-$1-p-$2',
    ),
    67 => 
    array (
      'rewrite' => '([a-zA-Z0-9\\-]+)/',
      'url' => 'home-role-show-dir-$1',
    ),
    68 => 
    array (
      'rewrite' => '([a-zA-Z0-9\\-]+)/index([0-9]+)',
      'url' => 'home-star-show-dir-$1-p-$2',
    ),
    69 => 
    array (
      'rewrite' => '([a-zA-Z0-9\\-]+)/',
      'url' => 'home-star-show-dir-$1',
    ),
    70 => 
    array (
      'rewrite' => '([a-zA-Z0-9\\-]+)/index([0-9]+)',
      'url' => 'home-special-show-dir-$1-p-$2',
    ),
    71 => 
    array (
      'rewrite' => '([a-zA-Z0-9\\-]+)/',
      'url' => 'home-special-show-dir-$1',
    ),
    72 => 
    array (
      'rewrite' => '([a-zA-Z0-9\\-]+)/index([0-9]+)',
      'url' => 'home-tv-show-dir-$1-p-$2',
    ),
    73 => 
    array (
      'rewrite' => '([a-zA-Z0-9\\-]+)/',
      'url' => 'home-tv-show-dir-$1',
    ),
    74 => 
    array (
      'rewrite' => '([a-zA-Z0-9\\-]+)/([0-9]+)/',
      'url' => 'home-up-show-dir-$1-month-$2',
    ),
    75 => 
    array (
      'rewrite' => '([a-zA-Z0-9\\-]+)/([0-9]+)/([0-9]+)/',
      'url' => 'home-up-show-dir-$1-month-$2-p-$3',
    ),
    76 => 
    array (
      'rewrite' => '([a-zA-Z0-9\\-]+)/([0-9]+)/([a-zA-Z0-9\\-]+)/',
      'url' => 'home-up-show-dir-$1-id-$2-type-$3',
    ),
    77 => 
    array (
      'rewrite' => '([a-zA-Z0-9\\-]+)/([0-9]+)/([a-zA-Z0-9\\-]+)/([0-9]+)/',
      'url' => 'home-up-show-dir-$1-id-$2-type-$3-p-$4',
    ),
    78 => 
    array (
      'rewrite' => '([a-zA-Z0-9\\-]+)',
      'url' => 'home-my-show-dir-$1',
    ),
  ),
  'user_administrator' => 1,
  'admin_login_validate' => true,
  'addon_dir' => 
  array (
    0 => 'lib',
    1 => 'public',
    2 => 'tpl',
  ),
  'theme' => 
  array (
    'pc_theme' => '#!xichen',
    'm_theme' => '#!mxichen',
  ),
  'http_exception_template' => 
  array (
    404 => '/home/wwwroot/xichen.tv/tpl/home/#!xichen/my_404.html',
    401 => '/home/wwwroot/xichen.tv/tpl/home/#!xichen/my_401.html',
  ),
  'cache_prefix' => 'xichen_new_',
  'html_cache_compile_type' => 'file',
  'html_cache_rules' => 
  array (
    'home:index:index' => 
    array (
      0 => 'index',
      1 => '600',
    ),
    'home:vod:show' => 
    array (
      0 => 'show/{id}{dir|get_list_id}/{$_SERVER.REQUEST_URI|md5}',
      1 => '600',
    ),
    'home:vod:type' => 
    array (
      0 => 'type/{id}{dir|get_list_id}/{$_SERVER.REQUEST_URI|md5}',
      1 => '600',
    ),
    'home:vod:read' => 
    array (
      0 => 'vod/{id|get_small_id}{pinyin|get_small_vod_id}/{id}{pinyin|get_vod_id}/index',
      1 => '600',
    ),
    'home:vod:play' => 
    array (
      0 => 'vod/{id|get_small_id}{pinyin|get_small_vod_id}/{id}{pinyin|get_vod_id}/play_{$_SERVER.REQUEST_URI|md5}',
      1 => '600',
    ),
    'home:vod:news' => 
    array (
      0 => 'vod/{id|get_small_id}{pinyin|get_small_vod_id}/{id}{pinyin|get_vod_id}/news_{$_SERVER.REQUEST_URI|md5}',
      1 => '600',
    ),
    'home:vod:filmtime' => 
    array (
      0 => 'vod/{id|get_small_id}{pinyin|get_small_vod_id}/{id}{pinyin|get_vod_id}/filmtime',
      1 => '600',
    ),
    'home:story:show' => 
    array (
      0 => 'show/{id}{dir|get_list_id}/{$_SERVER.REQUEST_URI|md5}',
      1 => '600',
    ),
    'home:story:read' => 
    array (
      0 => 'story/{id|get_small_story_id}{pinyin|get_small_vod_id}/{id|get_story_id}{pinyin|get_vod_id}/{$_SERVER.REQUEST_URI|md5}',
      1 => '600',
    ),
    'home:actor:show' => 
    array (
      0 => 'show/{id}{dir|get_list_id}/{$_SERVER.REQUEST_URI|md5}',
      1 => '600',
    ),
    'home:actor:read' => 
    array (
      0 => 'actor/{id|get_small_actor_id}{pinyin|get_small_vod_id}/{id|get_actor_id}{pinyin|get_vod_id}/index',
      1 => '600',
    ),
    'home:role:show' => 
    array (
      0 => 'show/{id}{dir|get_list_id}/{$_SERVER.REQUEST_URI|md5}',
      1 => '600',
    ),
    'home:role:read' => 
    array (
      0 => 'actor/{id|get_small_role_id}/{id|get_role_id}/{id}',
      1 => '600',
    ),
    'home:news:show' => 
    array (
      0 => 'show/{id}{dir|get_list_id}/{$_SERVER.REQUEST_URI|md5}',
      1 => '600',
    ),
    'home:news:read' => 
    array (
      0 => 'news/{id|get_small_id}/{id}/{$_SERVER.REQUEST_URI|md5}',
      1 => '600',
    ),
    'home:star:show' => 
    array (
      0 => 'show/{id}{dir|get_list_id}/{$_SERVER.REQUEST_URI|md5}',
      1 => '600',
    ),
    'home:star:type' => 
    array (
      0 => 'type/{id}{dir|get_list_id}/{$_SERVER.REQUEST_URI|md5}',
      1 => '600',
    ),
    'home:star:read' => 
    array (
      0 => 'star/{id|get_small_id}{pinyin|get_small_star_id}/{id}{pinyin|get_star_id}/{$_SERVER.REQUEST_URI|md5}',
      1 => '600',
    ),
    'home:star:work' => 
    array (
      0 => 'star/{id|get_small_id}{pinyin|get_small_star_id}/{id}{pinyin|get_star_id}/{$_SERVER.REQUEST_URI|md5}',
      1 => '600',
    ),
    'home:star:hz' => 
    array (
      0 => 'star/{id|get_small_id}{pinyin|get_small_star_id}/{id}{pinyin|get_star_id}/{$_SERVER.REQUEST_URI|md5}',
      1 => '600',
    ),
    'home:star:role' => 
    array (
      0 => 'star/{id|get_small_id}{pinyin|get_small_star_id}/{id}{pinyin|get_star_id}/{$_SERVER.REQUEST_URI|md5}',
      1 => '600',
    ),
    'home:star:news' => 
    array (
      0 => 'star/{id|get_small_id}{pinyin|get_small_star_id}/{id}{pinyin|get_star_id}/{$_SERVER.REQUEST_URI|md5}',
      1 => '600',
    ),
    'home:tv:show' => 
    array (
      0 => 'show/{id}{dir|get_list_id}/{$_SERVER.REQUEST_URI|md5}',
      1 => '600',
    ),
    'home:tv:read' => 
    array (
      0 => 'tv/{id|get_small_id}{pinyin|get_small_tv_id}/{id}{pinyin|get_tv_id}/{$_SERVER.REQUEST_URI|md5}',
      1 => '600',
    ),
    'home:special:show' => 
    array (
      0 => 'show/{id}{dir|get_list_id}/{$_SERVER.REQUEST_URI|md5}',
      1 => '600',
    ),
    'home:special:read' => 
    array (
      0 => 'special/{id|get_small_id}{pinyin|get_small_special_id}/{id}{pinyin|get_special_id}/{id}{pinyin|get_special_id}',
      1 => '600',
    ),
    'home:my:show' => 
    array (
      0 => 'my/{id}{dir|get_list_id}',
      1 => '600',
    ),
  ),
  'zanpiancms' => 
  array (
    'version' => 'v7.7.01',
    'name' => '赞片CMS',
    'title' => 'ZanPianCms',
    'qq' => '2528119536@qq.com',
    'cmsurl' => 'http://www.zanpiancms.com',
    'bbsurl' => 'http://bbs.zanpiancms.com',
    'helpurl' => 'http://www.kancloud.cn/zxiaoyu/zanpiancms?token=tLec5RP8fwy4',
    'copyright' => '<div class="copyright" style="display:block;text-align:center">Powered by ZanPianCms ©2017-2018 All Rights Reserved <a href="http://www.zanpiancms.com" target="_blank">赞片CMS</a></div>
</body>',
    'ad' => '免费全网全能视频解析，无广告 http://api.tv6.com/api?url= <span style="color:#E53333;"><strong>需要免费解析将此地址写</strong><strong>在下面输入栏中</strong></span>，技术支持QQ群:145728294<span id="transmark"></span>',
    'api_url' => 'http://yanzheng.97bike.com/',
  ),
));